Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heuristic depth-first search on exploration #25

Open
DepthDeluxe opened this issue Oct 23, 2014 · 11 comments
Open

Heuristic depth-first search on exploration #25

DepthDeluxe opened this issue Oct 23, 2014 · 11 comments

Comments

@DepthDeluxe
Copy link
Member

Implement heuristic depth-first search when the robot is exploring. Should be guided to the center but also able to explore an entire maze, regardless of its structure.

@DepthDeluxe
Copy link
Member Author

@BoolLi what is your status on this?

@BoolLi
Copy link
Member

BoolLi commented Nov 5, 2014

@DepthDeluxe Sorry I was busy having interviews this week. I will definitely start working on this over this weekend. I will make sure I have something new by next Monday.

@BoolLi
Copy link
Member

BoolLi commented Nov 13, 2014

@DepthDeluxe This line here:
https://github.com/BucknellMARC/MicroMouse-Sim/blob/master/src/logic/Explore.c#L57

What if the robot starts at a position where there is only one way to go? The current logic will have the robot go back, but since it's the first step, there's no history to go back yet.

I will try to implement a recursive way to do depth-first search.

@mazemaker1
Copy link

According to the rules, the robot always starts in a spot surrounded by
walls on three sides with only on initial direction it can go.

On Wed, Nov 12, 2014 at 8:34 PM, Li Li [email protected] wrote:

This line here:

https://github.com/BucknellMARC/MicroMouse-Sim/blob/master/src/logic/Explore.c#L57

What if the robot starts at a position where there is only one way to go?
The current logic will have the robot go back, but since it's the first
step, there's no history to go back yet.

I will try to implement a recursive way to do depth-first search.


Reply to this email directly or view it on GitHub
#25 (comment)
.

@BoolLi
Copy link
Member

BoolLi commented Nov 13, 2014

Then the code won't work if this is the case. In the simulation, the robot always starts at the position where there are at least two ways to go. This is why this bug was not spotted before. I will try to fix it.

@DepthDeluxe
Copy link
Member Author

@BoolLi good catch, that will be a problem. Could be causing some crashes as documented by #21

@BoolLi
Copy link
Member

BoolLi commented Nov 13, 2014

@DepthDeluxe I updated the code and fixed this potential cause of #21, but I haven't thought of an effective way to implement the heuristic yet. I will do it tomorrow.

@BoolLi
Copy link
Member

BoolLi commented Nov 13, 2014

@DepthDeluxe Because this fix is not related to the heuristic, I think you can consider merging this branch to master first.
Also can we assume that the robot will have to explore the whole maze before actually solving the maze? If not, we might need to change this method:
https://github.com/BucknellMARC/MicroMouse-Sim/blob/master/src/logic/Robot.c#L36

@DepthDeluxe
Copy link
Member Author

@BoolLi 👍, send me a PR

no that method should only be run once the whole maze is explored. The explore_suggest() function should run until the robot has discovered the whole maze.

@BoolLi
Copy link
Member

BoolLi commented Nov 13, 2014

@DepthDeluxe I just meant that in the real competition, are we allowed to scan the whole maze with unlimited amount of time?

@DepthDeluxe
Copy link
Member Author

We have 10 minutes to scan and make our best time. This should be enough
time to solve for the whole maze.

On Wed, Nov 12, 2014, 10:11 PM Li Li [email protected] wrote:

I just meant that in the real competition, are we allowed to scan the
whole maze with unlimited amount of time?


Reply to this email directly or view it on GitHub
#25 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants