Dev Update #1.1: A* Update

Dev Update #1.1: A* Update

So one last update before calling it a day, just improved the A* pathfinding to take into account undesirable tiles while tracing the basic shot from the Tee, and to sample in all 8 neighbours instead of just the regular four. You can see it in action below:

codemagic

  • The solid white line represents the direct distance to the hole
  • The blue tiles are the tiles selected by the A* algorithm as the best candidates for strokes
  • The dashed line is the combination of strokes creating the basic shot of this course

The distance to hole also changes based on the strokes created by the basic shot, and of course so does the Par rating. At 282m, this is a rather short Par 4 that can decently be accomplished in 3.

Next step is to make the algorithm take into account if there’s any fairways between the tee and the hole, in order to create more desirable base shots.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s