A samurai battling a bunch of robotic spiders that shoot deadly lasers, anyway, just another day in the life of a samurai...
This project is also a sandbox to work with handmade IA algorithms. The intent is to create a model to guide the actions of the spiders, making them act in the group in a smart way.
The next GIF show the vision of the player and the spiders. Both the characters have a multiple of 36 lines of sight around, 10° apart. Every 36 lines are destined to identify a certain object, returning 1
if seen, or 0
if not.
The characters of spiders have 4 groups of 36 lines of sights, each one identify below, in order of priority:
- Red lines: Enemy (player) detected.
- Blue lines: Laser detected.
- Green lines: Ally (spiders) detected.
- Black lines: Wall detected.
In case none of the items above is identified, the line is present in silver.
- Silver lines: Nothing detected.
The character of the player doesn't have the group of lines of sight destined to allies.
Also, the two classes of characters have an extra "line" of sight in format of a square, as a mean to prevent lasers coming from a blindspot.
$ # Create and activate a virtual environment
$ pip install requirements.txt # Install the dependencies
$ python reflexy/main.py
$ pip install -r requirements-dev.txt # Install the dependencies
$ pytest reflexy