public AcpcGame(TableType tableType) { _botGameState = null; _prevMatchState = null; _tableType = tableType; _heroInd = 0; _bigBlindSize = 100; _startStackSize = 200 * _bigBlindSize; _totalSaldo = 0; _options = new OpponentModeling.Options(); _options.recentHandsCount = 1000; var startTime = DateTime.Now; if (tableType == TableType.HeadsUp) { _numPlayers = 2; _opponentModeling = new OpponentModeling("full_stats_list_hu.bin", _bigBlindSize, tableType, _options); } else if (tableType == TableType.SixMax) { _numPlayers = 6; _opponentModeling = new OpponentModeling("full_stats_list_6max.bin", _bigBlindSize, tableType, _options); } else { throw new InvalidOperationException("Not supported table type"); } var timeStr = timeToString(DateTime.Now - startTime); Console.WriteLine("Opponent modeling made (BBSize: " + _bigBlindSize.ToString() + ")" + timeStr); }
public PlayVsBotsForm() { InitializeComponent(); _bigBlindSize = 4; _options = new OpponentModeling.Options(); _options.recentHandsCount = 30; _tableType = (NUM_PLAYERS == 2) ? TableType.HeadsUp : TableType.SixMax; var statListFile = (NUM_PLAYERS == 2) ? "full_stats_list_hu.bin" : "full_stats_list_6max.bin"; _opponentModeling = new OpponentModeling(statListFile, _bigBlindSize, _tableType, _options); var pokerClient = PokerClient.G5; _gameTableControl.NextButtonPressed += buttonNext_Click; _gameTableControl.FoldButtonPressed += buttonFold_Click; _gameTableControl.CallButtonPressed += buttonCheckCall_Click; _gameTableControl.RaiseButtonPressed += buttonBetRaise_Click; _heroInd = 0; String[] playerNames = new string[NUM_PLAYERS]; playerNames[0] = "Player"; for (int i = 1; i < NUM_PLAYERS; i++) { playerNames[i] = "Bot" + i.ToString(); } _startStackSize = _bigBlindSize * 100; for (int i = 0; i < NUM_PLAYERS; i++) { _botGameStates[i] = new BotGameState(playerNames, i, 0, _bigBlindSize, _startStackSize, pokerClient, _tableType, new Logic.Estimators.ModelingEstimator(_opponentModeling, pokerClient)); } _totalInvestedMoney = _startStackSize; startNewHand(); displayState(); }
public GymGame(TableType tableType, bool[] controlPlayer) { _bigBlindSize = 100; _startStackSize = 200 * _bigBlindSize; if (tableType == TableType.HeadsUp) { _numPlayers = 2; } else if (tableType == TableType.SixMax) { _numPlayers = 6; throw new InvalidOperationException("Not supported table type SixMax"); } else { throw new InvalidOperationException("Not supported table type"); } String[] playerNames = { "Player0", "Player1" }; _botGameStates = new BotGameState[_numPlayers]; _controlPlayer = controlPlayer; var oppModelingOptions = new OpponentModeling.Options(); oppModelingOptions.recentHandsCount = 1000; for (int i = 0; i < _numPlayers; i++) { _opponentModeling = controlPlayer[i] ? new OpponentModeling("full_stats_list_hu.bin", _bigBlindSize, tableType, oppModelingOptions) : null; var estimator = controlPlayer[i] ? new G5.Logic.Estimators.ModelingEstimator(_opponentModeling, PokerClient.G5) : null; _botGameStates[i] = new BotGameState(playerNames, i, 0, _bigBlindSize, _startStackSize, PokerClient.G5, tableType, estimator); } }