$ a function guessing game
The Black Box Challenge is a terminal-based coding game where users attempt to reverse-engineer mystery functions. Players test the function with different inputs, observe outputs, and write code to replicate its behavior using a custom programming language and interpreter.
The final product is a complete interpreter and interactive coding challenge system built from scratch.
The system features a custom programming language with support for arithmetic, logical, and bitwise operations, variable assignment, and multi-statement programs. The interpreter uses abstract syntax trees and the visitor pattern for clean code organization.
Key features include a terminal-based UI with live code editing, parameter testing table showing expected vs. actual outputs, real-time syntax error reporting, and support for custom mystery functions loaded from files.
This project provided deep insights into compiler design and language implementation. Building a complete interpreter from lexer to evaluator illuminated how programming languages work under the hood and the importance of good patterns.
Some key takeaways include: