| name | Implementing Heuristic Agent |
| description | Develop a hard-coded, rule-based algorithm to establish the primary business baseline that the RL network must beat. |
| version | 0.1.0 |
Implementing Heuristic Agent
RL algorithms require vast computational resources. To justify this cost, the final neural network must significantly outperform basic "if-then" logic. This skill creates the "Human/Dumb Baseline" using classic programmatic rules.
Step 1 — Extract Business Rules
Consult with the domain expert to identify the current operational logic.
- E.g., for traffic control: "If queue length A > B, switch to green for A."
- E.g., for finance: "If 50-day SMA crosses 200-day SMA, buy."
Step 2 — Construct the Agent Class
Write a python class containing a predict(observation) method that acts identically to an RL policy model, but uses pure un-learned python logic inside based on the raw observation array.
Step 3 — Benchmark
Run the heuristic agent inside the env.py for 1,000 episodes.
- Record the Mean Episode Return and Standard Deviation.
- This represents the exact "Minimum Viable Intelligence" threshold. If the RL algorithm cannot statistically outperform this heuristic return later in the pipeline, the RL project fails.
Output Format
Heuristic Baseline Results:
Average_Return: [Value]
Performance_Threshold_to_Beat: [Value]
Conclusion: [Ready to commence RL training]