Skip to content

Instantly share code, notes, and snippets.

@awesmubarak
Created November 22, 2024 14:00
Show Gist options
  • Save awesmubarak/8a1836367ffec44c12519404a363f3c0 to your computer and use it in GitHub Desktop.
Save awesmubarak/8a1836367ffec44c12519404a363f3c0 to your computer and use it in GitHub Desktop.

Introduction

  1. Recap
  2. Why this exact problem

High-level problem description

  • Create a grid
  • User defines a start point, an end point, and obstacles
  • A 'Robot' Traverses the grid and pathfinds it's way to the end

Steps

  1. Create a basic 10x10 grid composed of '.'s
  2. Create a robot somehwere on the grid (figure out how to do cordinates)
  3. Define a start and end point on the grid, and have the robot move (left - right). this is only on row 1.
  4. Define the start and end point at any cordinates, and have the robot traverse
  5. Define objects on the grid
  6. Implement 'simple wall following algorithm' (if an obstacle is deteceted, avoid it)

Advanced steps

  1. Implement Flood Fill/BFS algorithm as a seperate function. Test the performance
  2. Scale a lot (10^6)
  3. Random start point, end point, and objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment