Logo Lanfrica

AgbajeCity/agbaje_rl_summative

Domain:

agricultureclimate

Record type:

project
Creator:
Agb
Host:
Mission-Based RL: Nigeria Farm Climate Resilience - Protecting Smallholder Farmers from Climate Shocks using DQN, REINFORCE, PPO, A2C | ALU ML II # Nigeria Farm Climate-RL ## Reinforcement Learning for Agricultural Climate Resilience --- ## Mission Statement Tackle the threat of climate change to African food systems by engineering predictive intelligence tools, hyperlocal weather insights and early warning systems, using data science and machine learning skills to build digital defences that prevent crop losses and protect low-income smallholder farmers across Nigeria's vulnerable, underserved rural communities from climate-related shocks. --- ## Project Structure ``` agbaje_rl_summative/ ├── environment/ │ ├── custom_env.py # NigeriaFarmEnv - Custom Gymnasium environment (23KB) │ └── rendering.py # Advanced Pygame 2D visualization (21KB) ├── training/ │ ├── dqn_training.py # DQN with 10 hyperparameter configurations │ └── pg_training.py # REINFORCE, PPO, A2C with 10 configs each ├── models/ # Saved trained models (generated after training) │ ├── dqn/ │ └── pg/ ├── results/ # Training results CSVs and plots ├── main.py # Entry point for running best agent ├── requirements.txt # Project dependencies └── README.md ``` --- ## Environment: NigeriaFarmEnv ### Observation Space (16 features) | # | Feature | Range | Description | |---|---------|--------|-------------| | 0 | temperature | [20, 45] | Current temperature (°C) | | 1 | rainfall | [0, 400] | Monthly rainfall (mm) | | 2 | soil_moisture | [0, 1] | Soil moisture level | | 3 | crop_health | [0, 1] | Crop health index | | 4 | yield_forecast | [0, 5] | Expected yield (tons/ha) | | 5 | drought_risk | [0, 1] | Drought probability | | 6 | flood_risk | [0, 1] | Flood probability | | 7 | pest_risk | [0, 1] | Pest outbreak probability | | 8 | heat_risk | [0, 1] | Heat stress probability | | 9 | farmer_resources | [0, 1] | Available resources | | 10 | food_security_score | [0, 1] | Household food security | | 11 | market_price | [0.5, 2.0] | Crop m …