This is a start kit for those that will participate in Considition 2023 using Python.
main.py contains an example of:
- Fetching required data
- Submitting a solution to Considition 2023
- Scoring a solution locally and saving the "game"
- There will be a request limit for the Considition apis so if you wish to train a AI/ML or trying some brute force solution you'll have to use the scoring function that comes in this repo.
- Saved games can be visualized using the the notebook in this repo
visualization.ipynb is a notebook for visualizing games.
scoring.py contains the logic for how we score a solution.
api.py contains methods for using the Considition apis.
We recommended using visual studio code (https://code.visualstudio.com/Download) with the "Jupyter" extension for running the note book in this repo.
----Running main.py-----
- Install python 3.11. https://www.python.org/downloads/
- Navigate to the root folder of the project and create a virtual environment with required dependencies:
python -m venv .venv
- Activate the virtual environment and run
pip install -r requirements.txt
-
Create a .env file with you api token (see .example.env).
-
Run the program with
python .\main.py
----Running visualization.ipynb in vs code----
- Complete above steps
- Install the jupyter extension in vs code: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter&ssr=false#review-details
- Select the .venv created above steps as kernel for the notebook
- Run the notebook
- enter a game id
- Choose to fetch game from the Considtion APP or locally from the "my_games" folder.