ANONYMOUS wrote:
I believe there might be an issue with vote_outcome(),
def vote_outcome(self, mission, proposer, votes):
'''
mission is a list of agents to be sent on a mission.
The agents on the mission are distinct and indexed between 0 and number_of_players.
proposer is an int between 0 and number_of_players and is the index of the player who proposed the mission.
votes is a dictionary mapping player indexes to Booleans (True if they voted for the mission, False otherwise).
No return value is required or expected.
'''
Here it says votes is a dictionary, however this is not true, it appears that it is just a list with the playernumbers who voted yes. Is it ok to consider it as a list?
Good catch. Yes it seems that the person(s) who developed this code changed their mind at some point and forgot to change the documentation. This is why we provide testing code, however, so that you are able to make sure your agent actually works with the interface provided. Go with what the code actually does rather than what the (out of date) documentation says. If you are feeling paranoid, you could write your function so that it works for either format, for example by converting the dict format into a list if it is one:
def vote_outcome(self, mission, proposer, votes):
if type(votes) is dict:
votes = list(i for i, v in votes.items() if v)
...
You should be fine to just assume it is a list though. If your code functions correctly with the test code we have provided, it should function correctly when being assessed. The intent is to assess agent performance, not whether your agent implements the interface correctly (that is just a necessary part of being able to assess performance).
Cheers,
Gozz