i am building a micromouse using flood fill algorithm, i have made the code myself and implemented the floodfill algorithm. there is a global variable called initial_direction that is initially zero. when i keep the robot in some corners it solve the maze without any issue and also solve the floodfill correctly but when i keep it on another corner of the maze it’s solve the maze correctly up to certain point and then garbage values appears in the initial_direction and it get stuck. i am sure that there is no any othe problems like stack overflow etc.I have a while loop and this loop is used to update the numbers in the cell to find the best path, The issue occurs after entering this while loop, but it doesn’t happen every time, It seems to happen randomly after the loop is executed multiple times. .Could you kindly assist me in finding a solution to this problem? I’d be happy to share the full code if you’re able to respond to this message.
Ashintha Prabodha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3