0

I am working on a Pacman RL project and need to validate that there are a correct number of state permutations that I generated. My logic is as follows:

There are 15 player positions, 15 ghost positions, 15 positions that can have/not have a pellet. A ghost and a player can occupy the same spot, and a player or a ghost can occupy a spot where there is a pellet. This would give $$ 15\cdot15\cdot2^{15} $$

Would this be correct, if not why so? The code which I wrote to generate these permutations finds approximately 3.6 million possible permutations but my logic says there are approximately 7.3 million permutations.

Thanks in advance!

  • Does it matter that pacman cannot jump pellets? That is, pellets must be eaten in a sort of order? – Bonnaduck Nov 11 '21 at 04:01
  • I am trying to generate all permutations regardless if one is valid or not. Because this only needs to be done once I don’t care about complexity, and will then iterate over each state and validate which ones are possible. – Joshua Reisbord Nov 11 '21 at 13:00
  • Then your calculation is correct for $15$ positions for $1$ Pac-Man, $1$ ghost, and possible $15$ pellets. – Bonnaduck Nov 11 '21 at 13:20

0 Answers0