Bachelor's Degree in Artificial Intelligence
Instructors: Jordi Delgado & José Luis Balcázar
Practice: Teamwork Project, December 2024
This project focuses on developing an "abstract board" that allows players to play the classic Three-in-a-Row game (Tic-Tac-Toe), along with potential variations.
Initially, the program will support two human players interacting with the board via a functional programming style, using nonlocal declarations to achieve closure effects.
- Date: January 13, 2025
- Deliverables:
- Complete Python code (abs_board.py and any other supporting scripts).
- A report explaining:
- Why the submitted code is a correct solution.
- Main challenges faced and how they were addressed.
- Task distribution among team members.
The game is played in two phases:
- Placement Phase: Players place their pieces on the board.
- Movement Phase: Once all pieces are placed, players move their pieces to empty spaces.
- Board Size: 3x3
- Pieces per Player: 4
The program should be designed to allow easy configuration of board size and piece count.
General Rule Suggestion: For an NxN board, each player should have approximately ((N^2 - 1) / 2) pieces.
The project must include:
- Abstract Board Implementation: (abs_board.py)
- Driver Programs: Text-based and graphical (using Pygame) drivers to allow two human players to interact with the board.
- Initial driver programs will be provided to guide development.
- Teams must implement the abstract board to be compatible with these drivers.
- Additional drivers or functionality can be added if desired.
Note: Only an incomplete abstract board file (abs_board_h.py) will be provided as a starting point.
- Standard: The first player to align three pieces wins.
- Misery (Reverse Tic-Tac-Toe): The first player to align three pieces loses (Misère Game).
Additional variants are encouraged but not required. All decisions regarding variants must be documented in the final report.
- Teams must consist of two members.
- The final report must outline each member's contributions, detailing tasks and responsibilities.
- Code Files: Complete implementation of the abstract board and functional driver programs.
- Report: Detailing:
- Code correctness analysis.
- Challenges and solutions.
- Task distribution.
- Additional implemented features (if any).
- Clone the repository:
git clone https://github.com/Adrifib/pa1-practice.git
- Run the text-based driver:
python3 text_driver.py
- Run the graphical driver (if available):
python3 pygame_driver.py
- Tic-Tac-Toe Wikipedia
- Misère Game Wikipedia
- Python Documentation: Python.org
- Adrián Martínez Pérez
- Guillem Arnau Vallejos
Happy coding and good luck! 🚀✨