top of page
Search

Day 7: Getting Home Quickly

Ryan, Anthony, Anni

Today we added a function that optimizes the path the robot takes to get home.


Our previous method was not very efficient, so we chose to implement a small pathfinding algorithm in order to determine the quickest way back.


How it works:

- Analyze surrounding tiles

- If some tiles are not safe, ignore those tiles

- For the remaining tiles, calculate distance from (0, 0) using Pythagorean Theorem

- Get lowest distance

- Get tile whose distance is the lowest distance

- Move to tile

- Repeat until robot is at (0, 0)


This guarantees that our robot will always take the shortest path back to (0, 0) that is also 100% safe.


A problem:

The fact that the robot would get stuck sometimes because the closest safe space was the safe space that it was just on.


How we fixed it:

We adjusted our algorithm so that the tiles the robot could choose from did not include any tiles it had already been to after finding gold.



 
 
 

Recent Posts

See All

Day 10: Final Optimizations

As it's now time for battle, ARA-24 should be prepared for anything! Today we are trying to make small changes that will optimize ARA-24...

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by Wumpus World. Proudly created with Wix.com

bottom of page