During this activity, students will be able to:
For this programming assignment, students are required to complete all work independently and are not permitted to use AI-assisted tools, such as GitHub Copilot, ChatGPT, Gemini, or similar platforms, to automatically generate code. Using AI tools in this way undermines the learning process and violates academic integrity policies. The purpose of this assignment is to assess your understanding and application of the concepts covered in the course. Failure to comply with these guidelines may result in academic penalties, including but not limited to a lower grade.
If you have any questions about the assignment or need clarification on any concepts, please do not hesitate to visit your instructor during office hours. Rely solely on your own knowledge, the course materials, and any authorized resources provided by the instructor.
This activity must be developed in the pre-assigned teams of two.
Using the Dagor framework, design and implement in Python a player for the caterpillar game (Orugas) that plays by applying an “intelligent” strategy. Make sure to review the Adversarial search chapter from [KOPEC] in order to approach this problem adequately.
The each team’s implementation will compete against the implementations of the other teams in a strategy tournament whose rules are described below.
Each team will deliver their complete implementation contained in a single file. For each team number N
the file name must be equipoN.py
all lowercase letters. Likewise, the name of the class that implements the strategic player must have as prefix JugadorOrugas
and its suffix should be EquipoN
. For example, for team #7 the corresponding class must be named JugadorOrugasEquipo7
and must be contained in a file named equipo7.py
.
NOTE: You can find the team numbers in your Viva Engage Community:
The definition of the corresponding class must be the only code contained in the file to be delivered. In addition to the heuristica
and tira
methods, you’re allowed to add auxiliary methods and instance variables to the class.
The following snippet shows how the code developed by each team should be able to be used:
from dagor import JuegoOrugas, JugadorOrugasAleatorio from equipo1 import JugadorOrugasEquipo1 if __name__ == '__main__': juego = JuegoOrugas( JugadorOrugasEquipo1('Equipo 1'), JugadorOrugasAleatorio('RandomBoy'), 5, 8) juego.inicia(veces=100, delta_max=2)
The class developed by each team will face the other teams’ classes in a match.
Each match will consist of 100 games. A team will receive a certain number of points depending on the result:
The team with the most points gets first place in the tournament, the next team with the most points gets second place, and so on. There might be draws.
The size of the game board will be arbitrarily selected by the course instructor. This size will be the same for all matches and will be announced at the start of the tournament.
All matches will be run from the command line. The corresponding outputs will be stored as text files and may be consulted at a later time.
A team will automatically lose a match in the following cases:
A team will be disqualified from the entire tournament in the following cases:
Please ask the instructor if you have any questions about which operations in your code could cause your team to be disqualified from the tournament.
Any aspect not covered here will be resolved at the discretion of the instructor.
Place in a comment at the top of the equipoN.py
source file the authors’ personal information (student ID and name), for example:
#---------------------------------------------------------- # Project: Adversarial Caterpillars # # Date: 27-Nov-2024 # Authors: # A01770771 James Howlett # A01777771 Wade Wilson #----------------------------------------------------------
To deliver the equipoN.py
file, please provide the following information:
Only one team member needs to upload the file.
Due date is Wednesday, November 27.