Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 842 Bytes

File metadata and controls

24 lines (21 loc) · 842 Bytes

Bot should do the following (Manhattan distance)

  1. Calculate weights for each sector of the grid
  2. Look in the local area (not sector) for food. DONE
  3. If max range is reached without food, move toward the closest adjacent sector with the highest weight.
  4. Else if food is within max range: (check if one is previous target, check if target still exists)
  5. If food count is == 1; move toward food.
  6. else (greater than 1) do a flood fill algo to determine which food is connected to the most other food.
  7. move toward best choice. If flood fill indicates interconnection, pick one as a target and remember it.

checking neighbors

as r increases, the number of cells to check grows to... r*4 .....5...... ....545..... ...54345.... ..5432345... .543212345.. 54321012345. .543212345.. ..5432345... ...54345.... ....545..... .....5......