Pokerth to MTT Poker Simulation for Training

General PokerTH Issues
Post Reply
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

Hi ho :lol:
This is a MTT Simulation with 8 Players. And when one players lost
and stack = 0 then another Player with random stack takes this seat.
Just like in real MTTs.
But when human players stack = 0 then game is over ! :D
Next to do is to change bots behaviour. Maybe some Types of players
I will try to implement. Aggressive, passives, fish and a shark type.
I still have to think about how to do this. Any suggestions ?
https://youtu.be/_mVm6ijkkVU
I have changed ...\PokerTH\pokerth-stable\src\engine\game.cpp
to this:

Code: Select all

 
    #include "tools.h" // weiter  nach oben
    ...
    static int mttcounter = 500; // 500 mal darf ein Bot neu reinkommen
    // set player with empty cash inactive
    it = activePlayerList->begin();
    while( it!=activePlayerList->end() )
    {
      if((*it)->getMyCash() == 0)
      {
        // nur bots duerfen wieder neu reinkommen 
        if ( mttcounter > 0 && (*it)->getMyType() != PLAYER_TYPE_HUMAN )
        {
          mttcounter--; 
          int rndtmp;

          // Stack Zufallswert von SB*10 bis SB*200
          Tools::GetRand( getCurrentSmallBlind()*10, getCurrentSmallBlind()*200, 1, &rndtmp);
          (*it)->setMyCash( rndtmp );
        }
        else
        {
          (*it)->setMyActiveStatus(false);
          it = activePlayerList->erase(it);
        }
        // todo
        // logdatei und logfenster werden unerwartet gross 
        // koennte Problem werden ???
      }
    }
Last edited by sam289 on Tue May 16, 2023 11:45 am, edited 1 time in total.
sam289
Posts: 15
Joined: Mon Nov 23, 2020 12:00 am

Now I add 10 % ante deduction. It worked well YEAH, but it is more like a hack than following the OOP ideas.

Put real blindslist from Pokerstars Sunday Storm MTT in config.xml.
and comment out
// currentSmallBlind = min( currentSmallBlind,startQuantityPlayers*startCash/2 );
in game.cpp

Everybody can either go all in or bet as much as he has BB+Ante left
and if there is a blind increase, then the next value from the blinds list.

I found out where change code to see all hands. YEAH ! :lol: Now I will win all BBC.
Yes Yes it works, but only in local mode.
In client-server mode only my hands visible and the oppenents shows only
random 22 or other random hands. The oppenents cards stay at the server
and only send to client when it is necessary. The developers did good job.
Post Reply