- run
ng serve - to deploy:
- from front dir
ng build --configuration production(builds with production settings)- from root dir
firebase loginfirebase deploy
- from back dir
- run
shuttle run - deploy
shuttle deploy
The project includes a CLI tool for simulating Catan games between AI players:
- Build:
cargo build --bin simulate - Run:
cargo run --bin simulate -- [OPTIONS] - Run (optimized):
cargo run --release --bin simulate -- [OPTIONS]
-p, --players <CONFIG>: Player types (e.g., "MR" for MCTS vs Random)R: Random playerM: MCTS player
-n, --num_games <N>: Number of games to simulate (default: 1)-v, --verbose: Show detailed game logs
- MCTS vs Random (single game):
cargo run --bin simulate -- -p MR - Random vs MCTS (10 games):
cargo run --bin simulate -- -p RM -n 10 - Random vs Random with logs:
cargo run --bin simulate -- -p RR -v
Inspired by bcollazo's Catanatron. Licensed under GPL-3.0.
- Build the greatest catan bot player of all time
- Implement DB functionality to track user count and game history
- MCP integration
- Robber getting moved after first turn to wood 10 tile every time?
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt-get update sudo apt-get -y install cuda-toolkit-12-5
Follow these steps inside your WSL2 Ubuntu terminal to enable CUDA for Candle.
- Install CUDA toolkit in WSL2 (Ubuntu 24.04)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-5- Point canonical symlink to the installed version (12.5)
sudo ln -sfn /usr/local/cuda-12.5 /usr/local/cuda- Add CUDA to PATH and runtime libraries (make persistent)
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/lib/wsl/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc- Verify GPU visibility in WSL
nvidia-smi
which nvcc && nvcc --version
ls -l /usr/lib/wsl/lib/libcuda.so.1- Enable Candle CUDA features (already done in this repo)
# back/Cargo.toml
[dependencies]
candle-core = { version = "0.9.1", features = ["cuda"] }
candle-nn = { version = "0.9.1", features = ["cuda"] }- Rebuild and run
cargo clean
cargo run --bin trainExpected logs:
[device] using CUDA:0[infer] device=Device(Cuda(0))
-
Do not set
CUDARC_CUDA_VERSION.- If you previously exported it, unset and rebuild so cudarc can auto-detect from
nvcc:unset CUDARC_CUDA_VERSION cargo clean && cargo run --bin train
- If you previously exported it, unset and rebuild so cudarc can auto-detect from
-
Still seeing CPU device in logs
- Confirm WSL2 usage and
nvidia-smiworks inside WSL. - Ensure
/usr/lib/wsl/lib/libcuda.so.1exists andLD_LIBRARY_PATHincludes/usr/lib/wsl/lib. - Re-run with a fresh shell or
source ~/.bashrc.
- Confirm WSL2 usage and
-
Build is slow while testing
- Use a short training run:
SELF_PLAY_GAMES=1(default here). - Try optimized build:
cargo run --release --bin train.
- Use a short training run: