Instead of using this round method (i am interested to hear how you got this equation) couldn't you just keep a counter of how many times you iterate in the while loop which is the same amount as parents
This exists to calculate the percentage of nodes that are visited, not just the raw count. I arrive at this number of 10000, because the main method creates a 100x100 GridGraph, which has 10000 nodes.
https://github.com/angdav/cs435-p2/blob/7773ebbbc02f04d5968b58217efb4db4635591ad/p7.py#L69
Instead of using this round method (i am interested to hear how you got this equation) couldn't you just keep a counter of how many times you iterate in the while loop which is the same amount as parents