Skip to content

mcuelenaere/advent_of_code

Repository files navigation

Test puzzles Code quality

Advent of Code

This is my implementation of the puzzles found at adventofcode.com.

Personal goals

2017

No explicit goal.

2018

No explicit goal.

2019

No explicit goal.

2020

Goal: all solutions must be solved in under 1 second.

This sometimes resulted in resorting to C++ for certain puzzles, so the solutions aren't 100% in Python anymore.

2021

Goal: all solutions must be written in Rust.

This means that all solutions written since 2021 are in Rust (so not just all puzzles from 2021, but also some of the older years that were solved in 2021).

Getting Started

Prerequisites

You'll need Python 3, poetry and Rust.

Installing

The Python dependencies are specified in pyproject.toml, install them like this:

poetry install

The Rust dependencies are specified in rust/Cargo.toml, they are installed automatically if you run the above command.

Solving the puzzles

The following command allows you to solve a certain puzzle:

poetry run solve_puzzle --year 2017 --day 1

Or just solve all puzzles of that year:

poetry run solve_puzzle --year 2017

Or solve all puzzles:

poetry run solve_puzzle

Downloading new puzzles

If new puzzles are released, they can be downloaded using the following command:

poetry run download_puzzle --session-cookie="..." --year 2021

The session cookie refers to the session HTTP cookie being set on adventofcode.com.

About

My implementation of the puzzles at https://adventofcode.com/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published