This project was created while I was a Student Instructor for Computer Systems at the University of Southern Denmark. I helped Prof. Krzysztof Sierszecki guide first-year students through the course exercises and practical thinking behind the assignments.
For the last lecture, we gave students boards with predefined bots and challenged them to build smarter ones.
The goal is to place your marks in a line before the other bots do. Each board changes the size, obstacles, and win length, so the outcome depends on efficiency, blocking, and map awareness.
Join the Challenge
Fork or clone the X-in-Line GitHub repository, write your own bots, test them on different boards, and see how strategy changes the result.
The repository includes the Python source, board definitions, bot implementations, a custom board maker, and notes on the boards and bot I designed. Add your work through a pull request so new competitors and maps become part of the next challenge.
Create Your Own Board
Use tools/board_designer/board_designer.py to create your map visually, then save its generated code as a new file inside boards/. The board file should define BOARD_NAME, BOARD_WIDTH, BOARD_HEIGHT, WIN_LENGTH, NUM_PLAYERS, OBSTACLES, and GAME_TIME_MS.
How It Works
- Clone the project:
git clone https://github.com/MRM-MB/X-IN-LINE.git - Add a bot in
bots/or generate a board withpython tools/board_designer/board_designer.py. - Run the tournament from the project root:
python main.py. - Open a pull request to bring your bot or board into the ongoing competition.
The game automatically discovers board modules in boards/ and bot classes in bots/. Below are the main challenge features.
Technologies
Key Highlights
- Different boards test different strategies, not just raw speed.
- You can build both custom bots and custom boards.
- I created
HunterBot, which focuses on nearby moves instead of scanning the entire map. Explore the other bots' code to understand how their strategies work. 🔍
My Board Designs
Each board was built to reward a different kind of decision-making.
Snoopy Christmas
Snoopy Christmas is the biggest board. It rewards efficient bots that focus on useful positions instead of empty space.
Ginger Bread Cookies
Ginger Bread Cookies is narrow, tall, and full of obstacles. It rewards bots that handle tight spaces well.
Portal
Portal is split into small rooms connected by narrow openings. To win, a bot has to use the center and the portals well.
May the odds be ever in your bot's favor. 🤖