25 lines
976 B
Text
25 lines
976 B
Text
;Task:
|
|
Implement the classic children's game [[wp:Rock-paper-scissors|Rock-paper-scissors]], as well as a simple predictive '''AI''' (<u>a</u>rtificial <u>i</u>ntelligence) player.
|
|
|
|
Rock Paper Scissors is a two player game.
|
|
|
|
Each player chooses one of rock, paper or scissors, without knowing the other player's choice.
|
|
|
|
The winner is decided by a set of rules:
|
|
|
|
:::* Rock beats scissors
|
|
:::* Scissors beat paper
|
|
:::* Paper beats rock
|
|
|
|
<br>
|
|
If both players choose the same thing, there is no winner for that round.
|
|
|
|
For this task, the computer will be one of the players.
|
|
|
|
The operator will select Rock, Paper or Scissors and the computer will keep a record of the choice frequency, and use that information to make a [[Probabilistic choice|weighted random choice]] in an attempt to defeat its opponent.
|
|
|
|
|
|
;Extra credit:
|
|
Support additional choices [[wp:Rock-paper-scissors#Additional_weapons|additional weapons]].
|
|
<br><br>
|
|
|