You should be able to see what it does. The yellow dots are the squares in question, the red are squares determined as not in the correct path. It records where it has been, and when down the wrong path, will mark red (back-tracking) back to the next fork in the path; then, tries a different path.
danpost, I implemented the Maze Generation, (And gave you full credit)
Check it out here,
http://www.greenfoot.org/scenarios/4740
To get to your maze you need to find a cave ( they are under rocks) and then down the stairs inside a cave.
@tylers, you asked to see the codes. Well, I posted a new scenario called 'Maze Generator' with source. I hope that is sufficient. It only has the part to create the maze (but in multiple ways). It does not, however, have the player or the maze solving algorithm (or the timers; or muliple sizes).
uhhmm..we have project in our programming class,our teacher told us if we can ask one of the popular game users to let us see and copy the codes of any of the games and try it.the maze code and the sudoku or any games available. tnx.. pls. pls. pls. hehhe..i'll give u credit because of it..thanks
@Entity1037, I am not having any problems with any of the keys Also, I have to updated this in quite some time and nobody else has seemed to have any problems, either.
@ksksks, I started a discussion called "On 'The Maze Factory' by danpost" to show the Timer class code. It is located at: http://www.greenfoot.org/topics/4431
I really like it but how can u ever beat the computer with largest lvl took me 45sec while i knew the way after a couple of resets and computer needed 5.7sec
@UNDEAD_DC, the system does not take the same paths in the same order when solving the maze. Sometimes it will find the correct path very quickly; other times it takes a bit longer. Under the right circumstances, you can beat the system on the largest levels. You may have to do a bit better than 45 seconds, however. I think the longest the system will take on the largest level is about 35 to 36 seconds.
@danpost what i wanted to say is that the computer dot moves so much faster than the player. Is it possible that the speed of the computer solves the maze depends on how fast your computer is?
Cool, but the competition would be more fare if the number of steps walked also came into account when solving the puzzle since the computer can brute force so quickly :) hehe
@KalleLarson Agreed!, but it is possible to beat on the largest level. i completed it in 21.5 and the comp did it in 30.7, but it covered 3/4 of the maze. lol
I would also love to be able to view the source code of this scenario. It will help me quite a bit when it comes to leaning on how to create walls or blocks that will well... block your actors path. Since I am currently not having the best of luck finding the best way of implementing such a features.
@bilibull, this uses gridded world (cell sizes larger than one). Also, there are no walls here -- just blocks that are used to build the paths (players must remain on the block roads).
2012/4/9
2012/4/9
2012/4/9
2012/4/9
2012/4/9
2012/4/9
2012/4/20
2012/11/16
2012/11/18
2013/3/12
2013/3/18
2013/3/18
2013/3/18
2013/3/18
2013/3/18
2013/3/18
2013/6/5
2013/7/26
2013/7/26
2013/7/26
2013/7/26
2013/7/26
2013/9/10
2013/9/10
2013/11/25
2013/11/25
2013/11/25
2013/11/25
2014/1/6
2014/1/6
2014/1/6
2014/8/10
2014/8/12
2014/11/19
2015/4/29
2015/12/15
2015/12/15
2015/12/15
2018/1/30
2018/1/30
2018/4/26
2020/1/29
2020/3/11
2020/3/11
2023/4/28
2023/4/29
2024/5/23