During this activity, students will be able to:
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 Knight’s Dance game (Caballos bailadores) that plays by applying an “intelligent” strategy. Make sure to review the Adversarial search chapter from [KOPEC] in order to approach this problem adequately.
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 JugadorCaballosBailadores
and its suffix should be EquipoN
. For example, for team #7 the corresponding class must be named JugadorCaballosBailadoresEquipo7
and must be contained in a file named equipo7.py
.
You can find the team numbers in your Yammer 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 JuegoCaballosBailadores, \ JugadorCaballosBailadoresAleatorio from equipo7 import JugadorCaballosBailadoresEquipo7 if __name__ == '__main__': juego = JuegoCaballosBailadores( JugadorCaballosBailadoresEquipo7('Equipo 7'), JugadorCaballosBailadoresAleatorio('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’s 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: Knight’s Dance * * Date: 29-Nov-2023 * Authors: * A01770771 Kamala Khan * A01777771 Carol Danvers *----------------------------------------------------------*/
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 29.