Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.84 KB

File metadata and controls

29 lines (24 loc) · 1.84 KB

[CodeClash] Poker (HuskyBench)

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:

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:

  1. Each of the players' poker bot code (from the client/ folder) is copied into the arena docker container.
  2. We then run the a script that starts the poker engine and clients to run sims_per_round rounds of poker between the n bots:
#!/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 /logs

The 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.