This repository contains an adaptive intrusion detection system (IDS) built with reinforcement learning. It includes data preprocessing, model training, and frontend interface for experiment visualization.
backend/- Python modules for environment setup, preprocessing, DQN agent training, and utilities.frontend/- Simple web interface files for demo or visualization.data/- Test traffic data and raw dataset storage.models/- Saved model artifacts and checkpoints.notebooks/- Jupyter notebooks for analysis, experiments, and training workflows.results/- Evaluation outputs such as charts and summaries.
backend/environment.py- custom IDS environment definition.backend/preprocess_data.py- data cleaning, feature preparation, and scaling.backend/dqn_agent.py- deep Q-learning agent implementation.backend/train.py- training orchestration for baseline and RL agents.backend/main.py- entry point for running experiments or evaluation.
- Create and activate a Python virtual environment.
cd d:\RL\adaptive-rl-ids
python -m venv venv
.\venv\Scripts\Activate.ps1- Install dependencies.
pip install -r requirements.txtpython backend\train.pypython backend\main.pyOpen the notebooks in notebooks/ for step-by-step experiments and model evaluation.
- Avoid committing large generated artifacts under
models/andresults/unless required. - Keep the repository focused on code, analysis, and reproducible workflows.
- Add project structure and documentation.
- Add preprocessing and utility code.
- Add models and training logic.
- Add frontend and notebooks.
Dashboard.mp4
This repository is designed for academic experimentation with adaptive RL-based intrusion detection.