This repository contains my personal solutions for Advent of Code 2025, implemented in Lua.
You can run the solutions easily using the interactive Solution Wizard, or run individual day scripts manually.
- Lua interpreter installed (Lua 5.3+ recommended)
- A terminal or command prompt
You can check if Lua is installed with:
lua -vIf you do not have Lua installed, follow the instructions on the official site: https://www.lua.org/download.html
main.lua– The interactive Solution Wizard (recommended entry point)Day1.lua,Day2.lua, ... – Standalone solutions for each Advent of Code dayInput.lua– Shared input helper used by the day scriptsinput.txt– The puzzle input file (managed automatically by the Wizard)
The easiest way to run the solutions is via the Solution Wizard:
- Clone or download this repository.
- Open your terminal in the project folder.
- Start the wizard:
lua main.lua
- Follow the prompts:
- Enter the Day number you want to run (e.g.,
1). - Paste your puzzle input directly into the terminal.
- Type
ENDon a new line to finish pasting.
- Enter the Day number you want to run (e.g.,
The wizard will automatically save your input to input.txt, run the specific day's solution, and then loop back so you can run another day without restarting.
If you prefer to run specific scripts directly or want to manage the input file yourself:
- Paste your Advent of Code input for the specific day into
input.txt(replacing any existing content). - Run the Lua script for that day. For example:
Or for Day 2:
lua Day1.lua
lua Day2.lua
Note: If you switch days manually, you must overwrite input.txt with the new day's input before running the script.
- The wizard (
main.lua) handlesinput.txtautomatically, so you don't need to manually edit files when using it. - These solutions are written for clarity and learning; performance is generally more than sufficient for Advent of Code input sizes.
This is a personal Advent of Code solutions repository. Feel free to read and learn from the code; if you reuse any parts, please respect Advent of Code's rules and avoid posting full solutions publicly during the active event.