tayciryahmed / grid-navigation

Grid (lawn) navigation for multiple mowers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grid-navigation

Build Status Codacy Badge codecov

Grid navigation for multiple mowers.

Requirements

Python 3.7

To execute on a file

python navigation.py <input_file>

To run the tests

python -m pytest tests

Further improvements

  • Console entry point for navigation.py.
  • Further improve the pylint score (current score 9.37/10).
  • Change the reader the be an interator to manage big files and not read all lines in memory. Use of next to read mowers information inside the worker. The max number of processes (in the loop) would be the resources (processors) we have available.
  • Optimize the navigation for when the mower is turned in directions that cancel each other such as RL or LLLL/RRRR.
  • Manage the case many mowers are in the same position initially.
  • The check to ovoid overlapping mowers in navigation.py#L28 is not correct because considers the orientation, while comparing a 2-element tuple to a 3-element tuple.
  • Change all 'R', 'L', 'F' strings in string with an enum class in utils.py and or simply a dict (e.g. for multilingual input).
  • Change the check on instructions should be in [R', 'L', 'F'] to reader.py#L35

About

Grid (lawn) navigation for multiple mowers.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%