Franz Cesista's finals-qualifying strategy for the Russian AI Cup 2018 Codeball competition.
First, clone the repository by running
git clone https://github.com/leloykun/codeball-2018.gitThen go to the folder
cd codeball-2018Note: the simulators work best on Linux. You can run them on Windows, but you'll need to install the Windows Subsystem for Linux first.
Install linux system requirements by running
cd codeball2018-linux
./install_requirements.shYou may need to giver permission to execute the script by running
chmod +x install_requirements.shTo play the game against my bot, simply run
./run.shThen click on the (?) button to read the instructions.
If the current strategy is too hard for you, you can play with an 'easy' strategy by running
./run.sh helperYou can also practice moving around the map by running
./run.sh emptyFirst, read the Developer Guide. The Developer Guide contains the rules of the game, the API, and the strategy that you need to implement.
Then, modify the contents of cpp-cgdk/MyStrategy.cpp to implement your own strategy. You can also modify the associated c++ source files or even add new ones in the cpp-cgdk directory if you need to.
Once you're done, build the executable file of your bot by running
./rebuild.shAfter that, you can run the game and play with your bot by running
./run.shYou can also run the game with your bot and my pre-made bot by running
./run.sh autoTo run a benchmark test, simply run
./run_benchmark.shFor run.sh:
./run.sh [GAME_MODE="play"] [IP_ADDRESS="127.0.0.1"] [DURATION=18000] \
[P1_STRATEGY="cpp-cgdk/versions/CesistaStrategy_v47"] [P2_STRATEGY="cpp-cgdk/build/MyStrategy"] \
[P1_NAME="Cesista's Strategy"] [P2_NAME="Current Strategy"] [P1_PORT=31001] \
[P2_PORT=31002] [P1_KEY=0000000000000000] [P2_KEY=0000000000000000]Note: GAME_MODE can only be one of play, auto, helper, or empty.
For run_benchmark.sh:
./run_benchmark [BATCHES=1] [IP_ADDRESS="127.0.0.1"] [DURATION=18000]
[P1_STRATEGY="cpp-cgdk/versions/CesistaStrategy_v47"] [P2_STRATEGY="cpp-cgdk/build/MyStrategy"] \
[P1_NAME="Cesista's Strategy"] [P2_NAME="Current Strategy"]- Why does the GUI in WSL2 just display a blank canvas?
- You need to restart your WSL2. Try running
wsl --shutdownthenwsl
- You need to restart your WSL2. Try running
- Can I share my own bot? If so, how?
- Yes, of course! Just copy the executable file of your bot to
cpp-cgdk/versionsand rename it to[your last name here]_v[version number].
- Yes, of course! Just copy the executable file of your bot to
- How do I play the game?
- Run the game and click the
(?)button on the lower right side of the game window.
- Run the game and click the
- Fork this repository.
- Clone this repository into your local machine.
- Add and commit your changes to the repository. And don't forget to add your name to the Contributors section below.
- Submit a Pull Request and tag one of the contributors to review your code.
- Wait for the review and address the reviewer's comments if necessary.
- Wait for the reviewer to approve your PR.
- Merge your PR.
- Franz Louis Cesista, ML SWE at Expedock, 2x IOI & ICPC World Finalist.
