Feb-26-2022, 03:23 PM
(This post was last modified: Feb-26-2022, 03:47 PM by deanhystad.)
You are thinking about this backward. Why do you have a game history? The computer's next action is based on the results of the current game. The computer AI is one line per result. This program should be about 30 lines long. In Pythonny pseudo code:
computer_play = random play while True: get_human_play if human wins: next_play = human_play + 1 else if computer wins: next_play = human_play - 1 else: next_play = random play