Check out the console for the results of the game. TODO: Make a UI.
createModule().then((module) => { class SomeNewBot extends Bot { constructor(num_players, player_id, log = false) { // NOTE: Leave this as is. super(num_players, player_id, log); } // 0: Fold. 1: Take. 2: Play curr_card. 3: Play next card. // A bot that chooses random legal moves. Decide(curr_card, can_draw) { // Use this to see the state you have to work with. Remove // it when you don't need to see it any more. console.log({...this}) const next_card = curr_card === 7 ? 1 : curr_card + 1; const actions = [0]; if (can_draw) actions.push(1); if (this.my_card_counts[curr_card] > 0) actions.push(2); if (this.my_card_counts[next_card] > 0) actions.push(3); return actions[Math.floor(Math.random() * actions.length)]; } } // Logs results to the console. // Play against `JosephRlBotV1Infer` for hard mode. RunGames(50, module, [ JosephBotV1, JosephBotV1, JosephBotV1, SomeNewBot, // The bot defined above. ]); })
Execute