Rock-Paper-Scissors
Specification
The Rock Paper Scissors (rps) game is probably well-known: it's a two players
game.
The players play silmutaneously and have three possible plays: Rock,
Paper or Scissors.
The result of each play is:
-
the 2 players play the same, no point
-
Rock against Paper : Paper wins (and gains 1 point)
-
Rock against Scissors : Rock wins (and gains 1 point)
-
Scissors against Paper : Scissors wins (and gains 1 point)
A game duration is set to 10 plays.
The goal of this problem is to play to RPS with a multi agent system.
A referee called Bank is necessary to coordinate ths game since the plays
of the 2 players must be simultaneous. One of the player can be a human
player.
The involved agents of the solution
We defined 3 agents :
-
a Bank agent (called Bank): he asks the two players to
give their plays, then tell them the result of each play and at the end
of the game the result of this .
-
2 player agents :
-
one play R, P or C randomly (called RandomPlayer)
-
the other is an interface with a human agent (called HumanPlayer)
Note : to synchronyze the start of the game 2 agents have been added :
Super
and Go, they do nothing, the game begins when Go
has started.
Comments
-
you can create your own player with the strategy of your choice according
to the player interface