AncientFutureEnv — Hackathon Edition
AncientFutureEnv is a custom OpenEnv-style reinforcement learning environment that simulates the transformation of an ancient Mesopotamian settlement into a futuristic megacity.
This project combines:
- a custom Gymnasium environment
- a FastAPI backend
- an interactive browser frontend
- REST API endpoints for reset, step, state, and session control
The entire project currently runs from a single file: hackathon_app.py.
Project Idea
The environment starts with a partially ruined city grid. The agent must make decisions such as:
- building settlements
- creating farms
- building workshops
- constructing solar infrastructure
- preserving ruins
- demolishing structures
- progressing through technological eras
The goal is to balance:
- population growth
- food
- energy
- knowledge
- heritage
- pollution
- stability
The environment moves through these eras:
- Ancient
- Classical
- Industrial
- Digital
- Post-Human
Features
- Custom
gymnasium.Env environment
- 8x8 city simulation grid
- Multiple city resource metrics
- Era progression system
- Reward-based environment logic
- FastAPI REST API
- Session-based environment handling
- Interactive HTML frontend built into the app
- API explorer in browser UI
Tech Stack
- Python
- FastAPI
- Uvicorn
- Gymnasium
- NumPy
- Pydantic
File Structure