Game Designer & Programmer

Blog

AI Build 2

This week I iterated on my linear probability decision making by giving the actions, ya know, actual probabilities. In my first build, I was assigning probability values to the actions a player can take (rock, paper, scissors) essentially as points. I would add 1 to an actions value every time the player picked it, and the ai would make it's choice according to the highest "probability" value.

Capture.PNG

This week, I assigned probability as percentages instead of linear additions so that all of the action probabilities are adjusted in relation to each other. I also added an evaluation of the players previous action as a first-pass at pattern-recognition: if there is a tie in probabilities, the ai will check what the last action was and assume that same action will be taken the next turn. 

Capture1.PNG

Going forward, I want to assign that pattern recognition to the main decision tree through a "player profile" sort of deal. As the player makes winning moves, the ai will start recording the players last 3 inputs and store them as input chains that it will recognize and play against. That's the hope at least.

Build below.

Cole