Back to projects

CFG Derivation Game

A browser game where players apply context-free grammar rules to construct a target string before time or depth runs out.

CFG Derivation Game setup form for production rules, target string, tree depth, and time limit

About the project

The CFG Derivation Game turns a formal-languages exercise into a timed interaction. Players choose production rules, follow the current derivation, and try to reach the target within the available depth and time limits.

Project type
Educational web game
Contribution
Frontend development
Built with
ReactTailwind CSS

What I built

Interactive application of context-free grammar production rules.

Time and derivation-depth constraints that shape each round.

A React interface that keeps the current grammar state visible.