Welcome to Pathfind-RL.
This project aims to explore reinforcement learning techniques for pathfinding in a grid-based environment. It uses Pygame for visualization and a custom sprite handling system.
The project currently consists of two main components:
-
Sprite Generation: The
spritemaker()function (inmain.py) processes sprite sheets located in theassets/directory. It extracts individual sprites, indexes them, and saves the index for later use. This allows the game to easily load and display sprites from the sheets. TheSpriteMakerclass (inutils/getsprites.py) handles the sprite sheet processing. -
Game Loop and Grid Visualization: The
gameloop()function (inmain.py) initializes a Pygame window and creates aGameGridobject (fromutils/grid.py). The game loop handles basic events (like closing the window) and draws the grid on the screen. TheGameGridclass manages the grid's dimensions, tile size, and rendering.
- Python 3.12
- Conda or Python-venv (to manage virtual environments)
- Clone the repository:
git clone https://github.com/JustSurWHYving/pathfind-rl.git- Install the required packages:
pip install -r requirements.txt- Run the main script:
python main.py- The game window will open, displaying a grid.
