DNDS
Search…
🔰
Setup guide
This section will cover the installation of Dungeons and Data Structures.

1️⃣ Game Requirements

Dungeons and Data Structures requires a working version of Python 3. To check what version of Python you have, type the following into your terminal:
1
python --version
Copied!
If you don't have Python 3 installed on your machine, please go to the official Python web site here and follow installation instructions for your operating system.

2️⃣ Installing the game environment

1. Download the latest game release:
dungeon-0.1.6.tar.gz
4MB
Binary
Dungeons and Data Structures (0.1.6)
2. Install the game environment:
Assuming workspace is the directory you want to use to develop your AI-agent, open your terminal (as administrator) and run the following:
🍎MacOS / 🐧 Linux
💻 Windows
1
# Create a working directory for your project:
2
> mkdir -p ~/workspace/my-agent
3
​
4
# Change into that directory
5
> cd ~/workspace/my-agent
6
​
7
# Create a python virtual environment. Lets call it venv
8
> python3 -m venv venv
9
# Activate your new python environment
10
> source venv/bin/activate
11
​
12
# Install the Coder One Dungeon module you have previously downloaded:
13
> pip install ~/Downloads/dungeon-0.1.6.tar.gz
Copied!
1
# Create a working directory for your project:
2
> mkdir -p workspace\my-agent
3
​
4
# Change into that directory
5
> cd workspace\my-agent
6
​
7
# Create a python virtual environment. Lets call it venv
8
> python3 -m venv venv
9
# Activate your new python environment
10
> venv\Scripts\activate
11
​
12
# Install Coder One Dungeon module you have previously downloaded:
13
> pip install %UserProfile%\Downloads\dungeon-0.1.6.tar.gz
Copied!

Option B: Using Git

1. Alternatively, you can open your terminal and clone our GitHub Repo using:
1
$ git clone <https://github.com/CoderOneHQ/dungeons-and-data-structures.git>
Copied!
2. Then run the following commands:
1
> cd <git check-out>
2
​
3
# Create your Python virtual environment
4
> python3 -m venv venv
5
​
6
# Activate the virtual environment
7
> source venv/bin/activate # or for Windows use: venv\\Scripts\\activate
8
​
9
# Install game dependancies
10
> pip install -r coderone/requirements.txt
11
> pip install -r coderone/dungeon/requirements.txt
Copied!

Option C: Manual Installation

1. Download the package manually by heading over to our GitHub repo.
2. Click the 'Code' button on the right hand side and download the Zip file.
3. Unzip the folder in the destination of your choice (e.g. workspace/my-agent).
4. Open your terminal and run the following commands:
1
# Change into your working directory
2
> cd ~/workspace/my-agent
3
​
4
# Create a python virtual environment. Lets call it venv
5
> python3 -m venv venv
6
# Activate your new python environment
7
> source venv/bin/activate # or for Windows use: venv\\Scripts\\activate.bat
8
​
9
# Install the Coder One Dungeon module you have previously downloaded:
10
> pip install -r coderone/requirements.txt
11
> pip install -r coderone/dungeon/requirements.txt
Copied!

3️⃣ Testing your setup

In your terminal, ensure you're in the right working directory, then run:
1
coderone-dungeon --interactive coderone.dungeon.agent
Copied!
If the above doesn't work, you may need to try using python -m coderone.dungeon.main in replacement of the wrapper coderone-dungeon, for example:
1
python -m coderone.dungeon.main --interactive coderone.dungeon.agent
Copied!
You should then see the game load:
Hit ENTER to start the game. We've opened the game in interactive mode, meaning you can use the following keys to try playing the game yourself (you are playing as the Knight):
  • ENTER - pause / unpause the game
  • R - restart the game with new random map
  • ↑ / ↓ / ← / → - arrows to move the player
  • SPACE - place a bomb
If you got here without any errors - congratulations Dungeons and Data Structures is all set up!

4️⃣ Building your first AI Agent

It's time to build your first AI Agent! Click on the tutorial below to get started:
How to build an AI Bomberman bot (Part 1/3) | Coder One
Last modified 2mo ago