Question: C program: Your task is to write a program which asks the user for a move (Rock, Paperor Scissors) and then, based on the users
C program:
Your task is to write a program which asks the user for a move (Rock, Paperor Scissors) and then, based on the users move, chooses a response (Rock, Paper or Scissors). This process continues until the user decides to exit the game.
If the program knew the rules of the game, is would be trivial to make the program choose Paper when the user plays Rock, and Scissors when the user plays Paper, etc. Instead, your program should play randomly at first, and change its play based on previous games, through reinforcement learning.
After every game, the program should output the users move, the computers move, the outcome (win / draw), and the probability of the computers move.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
