Skip to content

TanakAiko/filler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filler Game - Rust Solution

Rust Docker

A Rust implementation of an AI player for the Filler game, containerized with Docker for easy testing and development.

📖 About

Filler is a strategic board game where two players (or AI bots) compete to occupy the maximum territory on a grid. This project contains a Rust-based AI solution that competes against pre-built robot opponents.

Game Demo

Here's an example of a game between Bender and Terminator:

Filler Game - Bender vs Terminator

🚀 Quick Start

Prerequisites

  • Docker installed on your system
  • Basic knowledge of command line operations

Initial Setup

Before building the Docker image, you need to download the required game files:

  1. Download the docker_image folder as a zip file from: https://assets.01-edu.org/filler/filler.zip
  2. Extract the zip file - it contains:
    • Dockerfile - Container configuration
    • game_engine - The game executable
    • maps/ - Game maps (map00, map01, map02)
    • robots/ - Pre-built opponent AIs (bender, h2_d2, terminator, wall_e)
  3. Ensure all files are properly extracted in your project directory

Building the Docker Image

Build the Docker image with the following command:

docker build -t filler .

Running the Container

Launch an interactive terminal session inside the container:

docker run -it filler

The solution directory is automatically mounted and compiled inside the container.

🎮 Playing the Game

Running a Game

Inside the container, use the game engine to start a match:

# Basic syntax
./game_engine -f <map_file> -p1 <player1> -p2 <player2>

Example Commands

Watch two robots compete:

./game_engine -f maps/map01 -p1 robots/bender -p2 robots/terminator

Test your solution against a robot:

./game_engine -f maps/map01 -p1 robots/bender -p2 solution/target/debug/solution

Available Maps:

  • maps/map00
  • maps/map01
  • maps/map02

Available Opponent Robots:

  • robots/bender - Standard difficulty
  • robots/terminator - Advanced difficulty ⚠️

📁 Project Structure

.
├── Dockerfile              # Container configuration
├── README.md              # This file
├── maps/                  # Game maps
│   ├── map00
│   ├── map01
│   └── map02
├── solution/              # Your Rust AI implementation
│   ├── Cargo.toml
│   ├── Cargo.lock
│   └── src/
│       ├── main.rs        # Main game logic
│       └── utils.rs       # Helper functions
└── robots/                # Pre-built opponent AIs

🛠️ Development

Building Your Solution

Your solution is located in the solution/ directory. The Docker container automatically builds it using:

cargo build --release

For development and debugging, you can use:

cargo build  # Debug build (faster compilation)

Testing Your Solution

  1. Make changes to the Rust code in solution/src/
  2. Rebuild the Docker image
  3. Run the container and test against different opponents and maps

📝 Notes

  • Terminator Challenge: The terminator robot is exceptionally strong and represents an advanced challenge. Beating it is optional but demonstrates a highly optimized solution.
  • The solution uses Rust's standard I/O to communicate with the game engine
  • Debug output is written to output.txt for troubleshooting

🎯 Strategy Tips

  • Analyze the board state carefully before each move
  • Consider both offensive and defensive positioning
  • Different maps may require different strategies
  • Start by consistently beating bender before challenging terminator

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

⭐ Star this repository if you found it helpful! ⭐

Made with ❤️ from 🇸🇳

About

A Rust-based AI implementation for the Filler strategy game. Compete against intelligent bot opponents in a territorial conquest challenge. Dockerized for easy setup and testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors