Create a bot to choose the smallest unique number.
(Based on a psychology experiment I heard about many years ago but haven't been able to track down again.)
- Each game will consist of 10 randomly selected bots playing 1000 rounds.
- Each round, all bots select an integer from 1 to 10 (inclusive). Any bots that choose the same value will be be excluded, and the remaining bot with the smallest value will receive a point.
- In the event that no bot picks a unique value, no points will be awarded.
- At the end of 1000 rounds, the bot with the most points (or all bots tied with the most points) wins the game.
- The tournament will last 200 * (number of players) games.
- The bot with the highest win percentage wins the tournament.
Bots must be Python 3 classes and must implement two methods:
Bots will be constructed with an index.
select is passed no arguments and returns the bot's choice for the current round.
update is passed a list of the choices made by each bot in the previous round.
class Lowball(object): def __init__(self, index): # Initial setup happens here. self.index = index def select(self): # Decision-making happens here. return 1 def update(self, choices): # Learning about opponents happens here. # Note that choices[self.index] will be this bot's choice. pass
- No bot will play in a game against itself. (Until there are 10 submissions, games will need to run with less than 10 bots.)
- In the unlikely event that a bot is included in less than 100 games, the tournament will be rerun.
- Bots may store state between rounds, but not between games.
- Accessing the controller or other bots is not allowed.
- The number of games and number of rounds per game are subject to increase if the results are too variable.
- Any bots that raise errors or give invalid responses (non-ints, values outside [1, 10], etc.) will be disqualified, and the tournament will be rerun without them.
- There is no time limit for rounds, but I may implement one if bots take too long to think.
- There is no limit on the number of submissions per user.
- The tournament will end on Friday, September 28 (two weeks from when this question is posted).