Two Plus Two Poker Forums Twoplustwo Evaluator Question
 Register FAQ Search Today's Posts Mark Forums Read TwoPlusTwo.com

 Notices The Theory of Poker Applied to No-Limit now available For those of you here in Las Vegas, The Theory of Poker Applied to No-Limit by David Sklansky is now available at Gambler’s General Store/ GAMBLER'S BOOK CLUB in downtown Las Vegas. Their address is 727 S Main St, Las Vegas, NV 89101 and their phone number is (702) 382-9903. We also have this title available in several special poker book promotions directly from Two Plus Two Publishing. For more info or to ask questions check out this thread in the books and publications forum: Sklansky Invites Reviews, Comments, And Questions, About Theory of Poker Applied To No Limit .

 08-23-2017, 01:07 PM #1 onionsareyummy stranger   Join Date: Aug 2017 Posts: 1 Twoplustwo Evaluator Question I am going through the source code of the 2+2 evaluator and trying to make sense of it but having a hard time. Specifically, this is the build I am looking at: https://github.com/tangentforks/TwoP...rate_table.cpp The way I understand it, for the first pass, the for loop generates every possible combination of cards adjusting for relevant suits. However for the second pass, I do not understand the logic used to index the HR array. The saveID function should return the index of the card combo within the ID array. Why is he then multiplying by 53, and adding 53? And then why is the maxHR computed as IDnum*53 + card + 53, and why is that being used as the index? Hopefully someone can shed some light on these questions.
08-26-2017, 07:23 AM   #2
au4all
veteran

Join Date: Apr 2011
Posts: 2,872
Re: Twoplustwo Evaluator Question

Quote:
 Originally Posted by onionsareyummy I am going through the source code of the 2+2 evaluator and trying to make sense of it but having a hard time. Specifically, this is the build I am looking at: https://github.com/tangentforks/TwoP...rate_table.cpp The way I understand it, for the first pass, the for loop generates every possible combination of cards adjusting for relevant suits. However for the second pass, I do not understand the logic used to index the HR array. The saveID function should return the index of the card combo within the ID array. Why is he then multiplying by 53, and adding 53? And then why is the maxHR computed as IDnum*53 + card + 53, and why is that being used as the index? Hopefully someone can shed some light on these questions.

 08-28-2017, 09:06 PM #3 just_grindin Pooh-Bah   Join Date: Dec 2007 Posts: 4,888 Re: Twoplustwo Evaluator Question I am fairly certain the answer is that he's calculating the index of the hand ranking array. For an explanation of why you would index an array this way (see arrays): https://www.interviewcake.com/articl...erviews#arrays Also see the section on pointers as he mentions pointers in the comments on that particular section but HR was of type int and not int* (array of pointers to integers if I have my syntax correct).

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Links to Popular Forums     News, Views, and Gossip     Beginners Questions     Marketplace & Staking     Casino & Cardroom Poker     Internet Poker     NL Strategy Forums     Poker Goals & Challenges     Las Vegas Lifestyle     Sporting Events     Other Other Topics Two Plus Two     About the Forums     Two Plus Two Magazine Forum     The Best of Two Plus Two Marketplace & Staking     Commercial Marketplace     General Marketplace     Staking - Offering Stakes     Staking         Staking - Offering Stakes         Staking - Seeking Stakes         Staking - Selling Shares - Online         Staking - Selling Shares - Live         Staking Rails         Transaction Feedback & Disputes     Transaction Feedback & Disputes Coaching & Training     Coaching Advice     Cash Game Poker Coach Listings     Tournament/SNG Poker Coach Listings Poker News & Discussion     News, Views, and Gossip     Poker Goals & Challenges     Poker Beats, Brags, and Variance     That's What She Said!     Poker Legislation & PPA Discussion hosted by Rich Muny     Twitch - Watch and Discuss Live Online Poker     Televised Poker General Poker Strategy     Beginners Questions     Books and Publications     Poker Tells/Behavior, hosted by: Zachary Elwood     Poker Theory     Psychology No Limit Hold'em Strategy     Medium-High Stakes PL/NL     Micro-Small Stakes PL/NL     Medium-High Stakes Full Ring     Micro-Small Stakes Full Ring     Heads Up NL     Live Low-stakes NL Limit Texas Hold'em Strategy     Mid-High Stakes Limit     Micro-Small Stakes Limit Tournament Poker Strategy     STT Strategy     Heads Up SNG and Spin and Gos     Mid-High Stakes MTT     Small Stakes MTT     MTT Community     Tournament Events Other Poker Strategy     High Stakes PL Omaha     Small Stakes PL Omaha     Omaha/8     Stud     Draw and Other Poker Live Poker     Casino & Cardroom Poker         Venues & Communities         Regional Communities     Venues & Communities     Tournament Events         WPT.com     Home Poker     Cash Strategy     Tournament Strategy Internet Poker     Internet Poker         Global Poker         MPN – Microgaming Poker Network         BetOnline.ag Online Poker     Commercial Software     Software         Commercial Software         Free Software General Gambling     Backgammon Forum hosted by Bill Robertie.     Probability     Sports Betting     Other Gambling Games 2+2 Communities     Other Other Topics         OOTV         Game of Thrones     The Lounge: Discussion+Review     EDF     Las Vegas Lifestyle     BBV4Life         omg omg omg     House of Blogs Sports and Games     Sporting Events         Single-Team Season Threads         Fantasy Sports     Fantasy Sports         Sporting Events     Wrestling     Golf     Chess and Other Board Games     Video Games         League of Legends         Hearthstone     Puzzles and Other Games Other Topics     Politics and Society     Playground: Well Named Loves Social Science     History     Business, Finance, and Investing     Science, Math, and Philosophy     Religion, God, and Theology     Travel     Health and Fitness     Laughs or Links!     Computer Technical Help     Programming

All times are GMT -4. The time now is 12:49 AM.

 Contact Us - Two Plus Two Publishing LLC - Privacy Statement - Top