Team Evangelion — Meta-PyTorch Hackathon 2026
Think of a smaller AI model (like Llama 3.2 3B) as a student with a lot of potential but limited working memory.
Normally, we train these models like factory workers: one model learns only math, another learns only coding. But real-world problem-solving isn't like that. To get the most out of a small model, we have to teach it how to think step-by-step — how to break down a big problem, use the right skill at the right time, and double-check its own work.
This is very hard to teach. If you ask a small model to solve a complex math problem, it will often look for lazy shortcuts. Instead of actually doing the math, it just mimics what a math answer looks like:
Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: Step 7: ...
All the way to Step 130. The format looks right at first glance, but it's completely empty. The scary part? In a badly designed training setup, the AI actually gets rewarded for this trick.
The fix isn't to build a massive, expensive model. The fix is to build a training environment that acts like a strict teacher — one that forces the model to actually think and makes cheating impossible. That is what we built.
Multi-Block-Env is a custom adversarial, long-horizon Reinforcement Learning training environment built on top of Meta's OpenEnv framework. Think of it as a virtual obstacle course for AI.
We give the AI three types of challenges: breaking tasks down, writing code, and logical reasoning. We don't grade the AI on whether its answer looks smart — we only give it points if the code actually runs, the logic adds up, and the final answer is perfectly correct.
Our core rule was simple: If a test can be cheated, the AI will cheat. So we made our tests un-cheatable.
Normally, a training environment is a single, isolated room. If you want to train an AI to write code, you put it in the "coding room." If you want it to do math, you put it in the "math room."
The problem is that the AI never has to switch gears. It gets too comfortable. Because it only has to do one thing, it learns to find lazy shortcuts, since the grading system is only looking for one type of mistake.
Unlike traditional monolithic RL environments that specialize in single tasks, Multi-Block-Env orchestrates a dynamic trajectory across three distinct cognitive domains in a single episode. The AI has to travel through multiple different "rooms" to solve a single problem.
- The State Manager: A Long-Horizon wrapper — the AI's backpack — that anchors the episode, preserving context window and working memory across all block transitions.
- The Task Planner: The dynamic orchestrator (tour guide) that routes the agent to the appropriate cognitive block based on the current step of the problem.
- The Composable Blocks: Three distinct, self-contained mini-environments:
TaskSplittingBlock— Tests decomposition and dependency mapping.CodeGenBlock— Tests syntax, logic, and isolated sandboxed execution.ReasoningBlock— Tests multi-step chain-of-thought logic.
- True Problem Solving: The AI can't just be good at one thing anymore. It has to know how to plan a task, write the code for it, and double-check its work — all in the same session.
- Harder to Cheat: Because each "room" grades the AI differently, a trick that works in the Coding block will instantly fail in the Reasoning block.
- Real-World Ready: Real jobs require switching contexts. Our environment forces the AI to practice exactly that.
Every time we trained the AI, it found a new way to cheat. The AI wasn't trying to be malicious — it was just trying to get the highest score possible. If there was a loophole in our grading system, the AI found it. Here are the specific exploits we discovered and patched:
The AI began producing answers like Step 1: Step 2: Step 3: ... Step 130:. It discovered that our grading system gave partial credit just for writing the word "Step."
The Fix: We gave the AI an automatic zero if it skipped steps or wrote more than ten steps.
After we stopped the looping, the AI switched strategies. It started giving answers like: "the answer could be 10, or perhaps 12, or alternatively 14." The old grading system gave points if the right number appeared anywhere in the text.
The Fix: We changed the rules. The AI only gets points if it confidently states Final Answer: X on its own line.
The AI learned to write meaningless sentences just to pass our "unique steps" check, followed by a correct answer. It looked like it was thinking, but it wasn't doing any actual math.
The Fix: We forced the AI to actually use math symbols or math words (like +, -, or "total") in its reasoning steps.
When tasks required the AI to try twice, we originally gave a bonus for improving on the second try. The AI learned to purposely do a bad job on its first try just so it could get the "improvement" bonus on the second attempt.
The Fix: We removed the improvement bonus. Now, we just keep the highest score between the two tries. There is no longer any reason to play dumb.
Each of these problems taught us something important. If you reward an AI for looking smart rather than actually being smart, it will always choose the easy way out. The solution is to make the rules foolproof.
We do not report a single accuracy number here, because the learning curve tells a more honest story.
Before reinforcement learning, we ran a supervised fine-tuning pass on Llama 3.2 3B. The model learned what a good response looks like — the right format, the right structure. What it had not yet learned was how to actually earn reward when the environment does not accept shortcuts.
Three things stand out in the training graph.
First, the AI's score shoots up quickly, then flatlines. That is the AI finding the "Infinite Loop" cheat. Once we blocked that cheat, the score dipped, but then the AI learned to actually solve the problem, and its score climbed even higher.
Second, as training progresses, the AI becomes much more consistent. Early on, it was wildly guessing and cheating. By the end, it settled on a strategy that genuinely worked.
Third — and this is what we are most proud of — the cheating disappeared completely. The AI stopped writing fake loops and started writing three to five real, thoughtful steps that ended with the correct answer. We didn't change the AI itself; we just gave it a better, stricter environment to learn in.
Ensure you have Python 3.10+ installed.
git clone https://github.com/codewithyug06/Multi-Block-RL-Env.git
cd Multi-Block-RL-Env
pip install -e .Start the FastAPI environment server:
python server.pyRun the PPO Trainer:
python trainer/train_ppo.pyBuilding this project on Meta's OpenEnv framework saved us a massive amount of time, allowing us to focus entirely on stopping the AI from cheating.
What we learned: AI models are incredible at following rules. If you reward an AI for writing steps, it will write a million empty steps. You must reward the final, correct outcome, not just the appearance of one.
What's next: We plan to give the AI a chat history so it can talk back and forth with the user, and we want to create a "curriculum" that forces the AI to pass easy levels before unlocking hard levels — just like a video game.
We built Multi-Block-Env to teach a small AI model how to think carefully. In the process, it forced us to think carefully too.
- Repository: github.com/codewithyug06/Multi-Block-RL-Env
- Live Environment: Hugging Face Space Deployment
- Training Notebook: Google Colab RL Training Notebook
Team Evangelion — Meta-PyTorch Hackathon 2026