Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+10 votes

How should we be evaluating the probabilities for the expectimax function? Are they all evenly distributed?

asked in CSC320 by (1 point)

2 Answers

+7 votes
 
Best answer

Yes, evenly distributed! Assume all opponent actions are equally likely...

answered by (3.4k points)
selected by
+8 votes

At the beginning of the game we have 7 column that are not full, so the probability for each is 1/7. Later in the game it does changes. You can get the number of open columns before entering the loop it will help preference. There are two different way to get the probability(open columns your denominator) for the current node call. We are given a method called _getLegalActions() that will give you number by taking the length, but it's a private method so it's not recommended. Second option is to check the length of pairs that are being returned by curNode.getActionsAndSuccessors(), that will give you the same number of open columns. Since selecting each column is equally likely you just need the number of open columns.

answered by (1 point)
...