Coding Machine Learning (C++, pseudo code only please) For a game of RPS, the computer should learn from the previous ga
Posted: Tue Jul 12, 2022 8:21 am
Coding Machine Learning (C++, pseudo code only please)For a game of RPS, the computer should learn from the previousgames to predict the players next throw and make a "winning"throw.
The computer uses code below to randomize its decisions:
srand(time(0));machine = rand() % 3 + 1;
I believe that I need to add some version of (#/number of gamesplayed) where # is the total of the outcomes of eachgame. Please walk me through how I can code this without giving up theentire code. I want to point out I understand the concept of an RPSmachine learning, I just can't seem to code it out.
The computer uses code below to randomize its decisions:
srand(time(0));machine = rand() % 3 + 1;
I believe that I need to add some version of (#/number of gamesplayed) where # is the total of the outcomes of eachgame. Please walk me through how I can code this without giving up theentire code. I want to point out I understand the concept of an RPSmachine learning, I just can't seem to code it out.