This is the starter codebase for the HuskyBench / Poker arena featured in CodeClash. The original source can be found here.
The code represented in this codebase comes from the following sources:
- https://github.com/kipiiler/poker-client: This is mapped to the
client/folder in this repository. This codebase contains the logic for the LM's poker bot. - https://github.com/kipiiler/pokerden-engine: This is mapped to the
engine/folder in this repository. This codebase contains the poker game engine that runs the matches between different poker bots.
We do not make any changes to the original codebases -- all code is exactly as in the original repositories.
We also don't include other huskyholdem-bench packages (e.g., frontend/, llm-engine/, server/) since they are not needed for the CodeClash setting.
During the competition phase of each round, the code interacts as follows:
- Each of the players' poker bot code (from the
client/folder) is copied into the arena docker container. - We then run the a script that starts the poker engine and clients to run
sims_per_roundrounds of poker between thenbots:
#!/bin/bash
rm -rf /app/output/* # Remove previous outputs
kill -9 $(lsof -ti :8000) # Kill previous game server if exists
python engine/main.py --port 8000 --players $n --sim --sim-rounds $sims_per_round
sleep 0.5 # Give server time to start
cd /p1 && python client/main.py --port 8000 > /logs/p1.log 2>&1 & # Start player 1
cd /p2 && python client/main.py --port 8000 > /logs/p2.log 2>&1 & # Start player 2
wait
mv /app/output/* /logs/ # Move output logs to /logsThe results are then determined as whichever bot has the most money at the end of all rounds.
For CodeClash, we run sims_per_round=100 rounds of poker.