The backend for the Q-Learning Grid Navigation environment, providing the logic and functionality for a Q-learning agent to navigate a 10×10 grid world.
https://github.com/CheraHamza/QLearningGridNavigation
This backend handles the environment's state representation, action space, reward structure, and interaction with the agent. It communicates with the front end to visualize and edit the environment and process actions from the agent.
- State representation — tracks the agent's position, goal, obstacles, and checkpoints
- Action space — supports movement in four directions (up, down, left, right)
- Reward structure — incentivizes reaching the goal while avoiding obstacles and visiting checkpoints
- API integration — communicates with the front end to update the environment state
- Q-learning integration — enables the agent to learn and improve performance over time
- Generalization accross different grid configurations is limited; the agent learns specific state-action pairs rather than abstract strategies.
- The reward structure is simplistic and may not capture complex navigation strategies or long-term planning.
| Layer | Technology |
|---|---|
| Framework | FastAPI |
| Web Server | Uvicorn + Gunicorn |
| Database | PostgreSQL |
| ORM | SQLAlchemy |