No description
Find a file
2024-12-07 11:25:14 +00:00
.devcontainer Part 2 2024-12-02 17:08:44 +00:00
.github add logo 2024-12-01 11:01:05 +00:00
.vscode Part 1 2024-12-01 11:20:13 +01:00
inputs Added readme 2024-12-01 10:56:47 +00:00
src no 2024-12-07 11:25:14 +00:00
.gitignore Added readme 2024-12-01 10:56:47 +00:00
README.md day 5 2024-12-07 11:08:26 +00:00

Advent of Code 2024 Solutions in Prolog

LoC GitHub last commit (branch)

This repository contains solutions for the Advent of Code 2024 challenges implemented in Prolog. The solutions are designed to read input data from text files, process the data, and compute the required results for each challenge.

What is Advent of Code? 🎄

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. Each day there will be a new problem that is split into 2 parts. The second parts is a more difficult variation of the first part. This repository contains my solutions to the Advent of Code 2024 puzzles

Solutions

Day Stars Code
Day 1: Historian Hysteria Code
Day 2: Red-Nosed Reports Code
Day 3: Mull It Over Code
Day 4: Ceres Search Code
Day 5: Print Queue Code

How to Run the Code

Install SWI-Prolog on your machine to run the solutions. Then log into the Advent of Code website and download the input data for the specific day you want to run the code for. Save the input data in a file named dayXX in the input directory, where XX is the day number.

Then run:

swipl
?- [day_01].  % Load the day_01.pl file
?- solve_part1(Part1_res).
?- solve_part2(Part2_res).