Hi, I tried running the run_game file, which gives me these errors. I think it may be a problem in the test files.
found agent: JassiAgent <class 'agents.Jassi_agent.JassiAgent'>
found agent: BasicAgent <class 'agents.basic_agent.BasicAgent'>
found agent: RandomAgent <class 'agents.random_agent.RandomAgent'>
found agent: SatisfactoryAgent <class 'agents.satisfactory_agent.SatisfactoryAgent'>
starting game size=10, agents=[RandomAgent ran6, SatisfactoryAgent sat9, JassiAgent jas1, BasicAgent bas4, BasicAgent bas3, SatisfactoryAgent sat10, JassiAgent jas2, SatisfactoryAgent sat11, BasicAgent bas5, RandomAgent ran7]
Traceback (most recent call last):
File "C:\Users\jasjo\OneDrive - UWA\Year 2 Semester 2\CITS3011 Intelligent Agents\Project_TheResistance\run_game.py", line 66, in
game = Game(agents)
File "C:\Users\jasjo\OneDrive - UWA\Year 2 Semester 2\CITS3011 Intelligent Agents\Project_TheResistance\game.py", line 37, in init
self.agents[agent_id].new_game(self.num_players,agent_id, spy_list)
File "C:\Users\jasjo\OneDrive - UWA\Year 2 Semester 2\CITS3011 Intelligent Agents\Project_TheResistance\agent_handler.py", line 66, in new_game
self.time_limit(self.agent.new_game, number_of_players, player_number, spy_list)
File "C:\Users\jasjo\OneDrive - UWA\Year 2 Semester 2\CITS3011 Intelligent Agents\Project_TheResistance\agent_handler.py", line 47, in time_limit
result = _time_limit(function, *args)
File "C:\Users\jasjo\OneDrive - UWA\Year 2 Semester 2\CITS3011 Intelligent Agents\Project_TheResistance\agent_handler.py", line 18, in wrapper
signal.signal(signal.SIGALRM, handle_timeout)
AttributeError: module 'signal' has no attribute 'SIGALRM'
The testing code only supports Unix systems, not Windows. If you do not yet already have a working Unix setup, I would recommend that you use Windows Subsystem for Linux (WSL) for its simplicity of setup on Windows.
This is because in order to implement the timeout the testing code uses an alarm signal (SIGALRM) that Windows does not support.
If a student so wished, they may modify the code to implement a similar timeout on Windows. Anyone who comes up with a cross-platform solution that does not cause other problems is welcome to make it available to other students, but your submission will be tested on Linux using the testing code as provided.
I have added a note about this to the project description.