lrbridge / mango

0 stars 1 forks source link

Fix part 2 #3

Open lrbridge opened 9 years ago

lrbridge commented 9 years ago

We should change heuristics from all being calculated up front to just the heuristic from the state you are in being calculated at run time.

Then, we should update the TurnsHeuristic to be smarter since it now knows what direction it is facing for sure at a given square.

lrbridge commented 9 years ago

Hey @GoingtoRock - I haven't done this yet. I'll be working again tonight, so let me know if you want to take fixing part 2 or part 3b (whichever option you prefer) on.

lrbridge commented 9 years ago

I did refactor a little, so that might be why you thought I did this.

But what we need to do is:

  1. Move the heuristic calculation into the part where we are getting each child node, for each child node we'll just calculate the heuristic on the spot right there.
  2. For part 2, now we know the exact direction we're facing when we're looking at a child node and calculating the heuristic, so we can tweak TurnsHeuristic to take that into account. (Right now it does the bare minimum # of turns in the puzzle, whereas now we actually know how many we have to do from each given spot).

Make sense? Let me know if you'd rather do this or start part 3 b. I'll be online later tonight.

@GoingtoRock

GoingtoRock commented 9 years ago

I'll do part 3 then.

lrbridge commented 9 years ago

ok sounds good.