aoc

module
v0.0.0-...-be83087 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: Apache-2.0

README

Advent of Code

This repository contains my solutions for Advent of Code, mostly in Go.

Here's a map of what's in this repository.

  • Documentation
  • Go packages
    • 20??/*: Individual AoC puzzle solutions. If there's any code shared between multiple puzzles that's still specific to one year, it's also in here. The top-level subpackage for each year serves two functions: it imports all the days (so other packages can get them all as a group), and also contains a unit test to verify each puzzle using the puzzle inputs and outputs in the testdata/YYYY/dayDD.{txt,out} files.
    • cmd/aoc: Multipurpose binary to execute any of the puzzles.
    • glue: Framework code so that the individual puzzle solutions can register solvers (and possibly other related utilities) for the binary via init functions.
    • util: Utility code useful for solutions across years. Of special note are the types util.Level (for 2D roguelike style data) and util.Graph (for labeled digraphs). There are also two packages below this one:
      • util/fn: Very non-idiomatic-Go higher order functions, for conciseness.
      • util/ix: Integer functions that show up a lot in AoC puzzles.
  • Python code
    • 2019-py: The initial 2019 solutions I wrote in Python, before starting this whole Go adventure. May contain assorted odds and ends as well.
    • vis: Data visualization code. See vis/readme.md.
  • Esoteric languages

Directories

Path Synopsis
Package y2016 contains the glue and tests for all AoC 2016 days.
Package y2016 contains the glue and tests for all AoC 2016 days.
day01
Package day01 solves AoC 2016 day 1.
Package day01 solves AoC 2016 day 1.
day02
Package day02 solves AoC 2016 day 2.
Package day02 solves AoC 2016 day 2.
day03
Package day03 solves AoC 2016 day 3.
Package day03 solves AoC 2016 day 3.
day04
Package day04 solves AoC 2016 day 4.
Package day04 solves AoC 2016 day 4.
day05
Package day05 solves AoC 2016 day 5.
Package day05 solves AoC 2016 day 5.
day06
Package day06 solves AoC 2016 day 6.
Package day06 solves AoC 2016 day 6.
day07
Package day07 solves AoC 2016 day 7.
Package day07 solves AoC 2016 day 7.
day08
Package day08 solves AoC 2016 day 8.
Package day08 solves AoC 2016 day 8.
day09
Package day09 solves AoC 2016 day 9.
Package day09 solves AoC 2016 day 9.
day10
Package day10 solves AoC 2016 day 10.
Package day10 solves AoC 2016 day 10.
day12
Package day12 solves AoC 2016 day 12.
Package day12 solves AoC 2016 day 12.
day13
Package day13 solves AoC 2016 day 13.
Package day13 solves AoC 2016 day 13.
day14
Package day14 solves AoC 2016 day 14.
Package day14 solves AoC 2016 day 14.
Package y2017 contains the glue and tests for all AoC 2017 days.
Package y2017 contains the glue and tests for all AoC 2017 days.
day01
Package day01 solves AoC 2017 day 1.
Package day01 solves AoC 2017 day 1.
day02
Package day02 solves AoC 2017 day 2.
Package day02 solves AoC 2017 day 2.
day03
Package day03 solves AoC 2017 day 3.
Package day03 solves AoC 2017 day 3.
day04
Package day04 solves AoC 2017 day 4.
Package day04 solves AoC 2017 day 4.
day05
Package day05 solves AoC 2017 day 5.
Package day05 solves AoC 2017 day 5.
day06
Package day06 solves AoC 2017 day 6.
Package day06 solves AoC 2017 day 6.
day07
Package day07 solves AoC 2017 day 7.
Package day07 solves AoC 2017 day 7.
day08
Package day08 solves AoC 2017 day 8.
Package day08 solves AoC 2017 day 8.
day09
Package day09 solves AoC 2017 day 9.
Package day09 solves AoC 2017 day 9.
day10
Package day10 solves AoC 2017 day 10.
Package day10 solves AoC 2017 day 10.
day11
Package day11 solves AoC 2017 day 11.
Package day11 solves AoC 2017 day 11.
day12
Package day12 solves AoC 2017 day 12.
Package day12 solves AoC 2017 day 12.
day13
Package day13 solves AoC 2017 day 13.
Package day13 solves AoC 2017 day 13.
day14
Package day14 solves AoC 2017 day 14.
Package day14 solves AoC 2017 day 14.
day15
Package day15 solves AoC 2017 day 15.
Package day15 solves AoC 2017 day 15.
day16
Package day16 solves AoC 2017 day 16.
Package day16 solves AoC 2017 day 16.
day17
Package day17 solves AoC 2017 day 17.
Package day17 solves AoC 2017 day 17.
day18
Package day18 solves AoC 2017 day 18.
Package day18 solves AoC 2017 day 18.
day19
Package day19 solves AoC 2017 day 19.
Package day19 solves AoC 2017 day 19.
day20
Package day20 solves AoC 2017 day 20.
Package day20 solves AoC 2017 day 20.
day21
Package day21 solves AoC 2017 day 21.
Package day21 solves AoC 2017 day 21.
day22
Package day22 solves AoC 2017 day 22.
Package day22 solves AoC 2017 day 22.
day23
Package day23 solves AoC 2017 day 23.
Package day23 solves AoC 2017 day 23.
day24
Package day24 solves AoC 2017 day 24.
Package day24 solves AoC 2017 day 24.
day25
Package day25 solves AoC 2017 day 25.
Package day25 solves AoC 2017 day 25.
knot
Package knot implements the knot hash function (AoC 2017 days 10, 14).
Package knot implements the knot hash function (AoC 2017 days 10, 14).
Package y2018 contains the glue and tests for all AoC 2018 days.
Package y2018 contains the glue and tests for all AoC 2018 days.
cpu
Package cpu provides an emulator for the unnamed time travel control computer/wearable from AoC 2018.
Package cpu provides an emulator for the unnamed time travel control computer/wearable from AoC 2018.
day01
Package day01 solves AoC 2018 day 1.
Package day01 solves AoC 2018 day 1.
day02
Package day02 solves AoC 2018 day 2.
Package day02 solves AoC 2018 day 2.
day03
Package day03 solves AoC 2018 day 3.
Package day03 solves AoC 2018 day 3.
day04
Package day04 solves AoC 2018 day 4.
Package day04 solves AoC 2018 day 4.
day05
Package day05 solves AoC 2018 day 5.
Package day05 solves AoC 2018 day 5.
day06
Package day06 solves AoC 2018 day 6.
Package day06 solves AoC 2018 day 6.
day07
Package day07 solves AoC 2018 day 7.
Package day07 solves AoC 2018 day 7.
day08
Package day08 solves AoC 2018 day 8.
Package day08 solves AoC 2018 day 8.
day09
Package day09 solves AoC 2018 day 9.
Package day09 solves AoC 2018 day 9.
day10
Package day10 solves AoC 2018 day 10.
Package day10 solves AoC 2018 day 10.
day11
Package day11 solves AoC 2018 day 11.
Package day11 solves AoC 2018 day 11.
day12
Package day12 solves AoC 2018 day 12.
Package day12 solves AoC 2018 day 12.
day13
Package day13 solves AoC 2018 day 13.
Package day13 solves AoC 2018 day 13.
day14
Package day14 solves AoC 2018 day 14.
Package day14 solves AoC 2018 day 14.
day15
Package day15 solves AoC 2018 day 15.
Package day15 solves AoC 2018 day 15.
day16
Package day16 solves AoC 2018 day 16.
Package day16 solves AoC 2018 day 16.
day17
Package day17 solves AoC 2018 day 17.
Package day17 solves AoC 2018 day 17.
day18
Package day18 solves AoC 2018 day 18.
Package day18 solves AoC 2018 day 18.
day19
Package day19 solves AoC 2018 day 19.
Package day19 solves AoC 2018 day 19.
day20
Package day20 solves AoC 2018 day 20.
Package day20 solves AoC 2018 day 20.
day21
Package day21 solves AoC 2018 day 21.
Package day21 solves AoC 2018 day 21.
day22
Package day22 solves AoC 2018 day 22.
Package day22 solves AoC 2018 day 22.
day23
Package day23 solves AoC 2018 day 23.
Package day23 solves AoC 2018 day 23.
day24
Package day24 solves AoC 2018 day 24.
Package day24 solves AoC 2018 day 24.
day25
Package day25 solves AoC 2018 day 25.
Package day25 solves AoC 2018 day 25.
Package y2019 contains the glue and tests for all AoC 2019 days.
Package y2019 contains the glue and tests for all AoC 2019 days.
day01
Package day01 solves AoC 2019 day 1.
Package day01 solves AoC 2019 day 1.
day02
Package day02 solves AoC 2019 day 2.
Package day02 solves AoC 2019 day 2.
day03
Package day03 solves AoC 2019 day 3.
Package day03 solves AoC 2019 day 3.
day04
Package day04 solves AoC 2019 day 4.
Package day04 solves AoC 2019 day 4.
day05
Package day05 solves AoC 2019 day 5.
Package day05 solves AoC 2019 day 5.
day06
Package day06 solves AoC 2019 day 6.
Package day06 solves AoC 2019 day 6.
day07
Package day07 solves AoC 2019 day 7.
Package day07 solves AoC 2019 day 7.
day08
Package day08 solves AoC 2019 day 8.
Package day08 solves AoC 2019 day 8.
day09
Package day09 solves AoC 2019 day 9.
Package day09 solves AoC 2019 day 9.
day10
Package day10 solves AoC 2019 day 10.
Package day10 solves AoC 2019 day 10.
day11
Package day11 solves AoC 2019 day 11.
Package day11 solves AoC 2019 day 11.
day12
Package day12 solves AoC 2019 day 12.
Package day12 solves AoC 2019 day 12.
day13
Package day13 solves AoC 2019 day 13.
Package day13 solves AoC 2019 day 13.
day14
Package day14 solves AoC 2019 day 14.
Package day14 solves AoC 2019 day 14.
day15
Package day15 solves AoC 2019 day 15.
Package day15 solves AoC 2019 day 15.
day16
Package day16 solves AoC 2019 day 16.
Package day16 solves AoC 2019 day 16.
day17
Package day17 solves AoC 2019 day 17.
Package day17 solves AoC 2019 day 17.
day18
Package day18 solves AoC 2019 day 18.
Package day18 solves AoC 2019 day 18.
day19
Package day19 solves AoC 2019 day 19.
Package day19 solves AoC 2019 day 19.
day20
Package day20 solves AoC 2019 day 20.
Package day20 solves AoC 2019 day 20.
day21
Package day21 solves AoC 2019 day 21.
Package day21 solves AoC 2019 day 21.
day22
Package day22 solves AoC 2019 day 22.
Package day22 solves AoC 2019 day 22.
day23
Package day23 solves AoC 2019 day 23.
Package day23 solves AoC 2019 day 23.
day24
Package day24 solves AoC 2019 day 24.
Package day24 solves AoC 2019 day 24.
day25
Package day25 solves AoC 2019 day 25.
Package day25 solves AoC 2019 day 25.
intcode
Package intcode implements the AoC 2019 Intcode language.
Package intcode implements the AoC 2019 Intcode language.
Package y2020 contains the glue and tests for all AoC 2020 days.
Package y2020 contains the glue and tests for all AoC 2020 days.
day01
Package day01 solves AoC 2020 day 1.
Package day01 solves AoC 2020 day 1.
day02
Package day02 solves AoC 2020 day 2.
Package day02 solves AoC 2020 day 2.
day03
Package day03 solves AoC 2020 day 3.
Package day03 solves AoC 2020 day 3.
day04
Package day04 solves AoC 2020 day 4.
Package day04 solves AoC 2020 day 4.
day05
Package day05 solves AoC 2020 day 5.
Package day05 solves AoC 2020 day 5.
day06
Package day06 solves AoC 2020 day 6.
Package day06 solves AoC 2020 day 6.
day07
Package day07 solves AoC 2020 day 7.
Package day07 solves AoC 2020 day 7.
day08
Package day08 solves AoC 2020 day 8.
Package day08 solves AoC 2020 day 8.
day09
Package day09 solves AoC 2020 day 9.
Package day09 solves AoC 2020 day 9.
day10
Package day10 solves AoC 2020 day 10.
Package day10 solves AoC 2020 day 10.
day11
Package day11 solves AoC 2020 day 11.
Package day11 solves AoC 2020 day 11.
day12
Package day12 solves AoC 2020 day 12.
Package day12 solves AoC 2020 day 12.
day13
Package day13 solves AoC 2020 day 13.
Package day13 solves AoC 2020 day 13.
day14
Package day14 solves AoC 2020 day 14.
Package day14 solves AoC 2020 day 14.
day15
Package day15 solves AoC 2020 day 15.
Package day15 solves AoC 2020 day 15.
day16
Package day16 solves AoC 2020 day 16.
Package day16 solves AoC 2020 day 16.
day17
Package day17 solves AoC 2020 day 17.
Package day17 solves AoC 2020 day 17.
day18
Package day18 solves AoC 2020 day 18.
Package day18 solves AoC 2020 day 18.
day19
Package day19 solves AoC 2020 day 19.
Package day19 solves AoC 2020 day 19.
day20
Package day20 solves AoC 2020 day 20.
Package day20 solves AoC 2020 day 20.
day21
Package day21 solves AoC 2020 day 21.
Package day21 solves AoC 2020 day 21.
day22
Package day22 solves AoC 2020 day 22.
Package day22 solves AoC 2020 day 22.
day23
Package day23 solves AoC 2020 day 23.
Package day23 solves AoC 2020 day 23.
day24
Package day24 solves AoC 2020 day 24.
Package day24 solves AoC 2020 day 24.
day25
Package day25 solves AoC 2020 day 25.
Package day25 solves AoC 2020 day 25.
Package y2021 contains the glue and tests for all AoC 2021 days.
Package y2021 contains the glue and tests for all AoC 2021 days.
day01
Package day01 solves AoC 2021 day 1.
Package day01 solves AoC 2021 day 1.
day02
Package day02 solves AoC 2021 day 2.
Package day02 solves AoC 2021 day 2.
day03
Package day03 solves AoC 2021 day 3.
Package day03 solves AoC 2021 day 3.
day04
Package day04 solves AoC 2021 day 4.
Package day04 solves AoC 2021 day 4.
day05
Package day05 solves AoC 2021 day 5.
Package day05 solves AoC 2021 day 5.
day06
Package day06 solves AoC 2021 day 6.
Package day06 solves AoC 2021 day 6.
day07
Package day07 solves AoC 2021 day 7.
Package day07 solves AoC 2021 day 7.
day08
Package day08 solves AoC 2021 day 8.
Package day08 solves AoC 2021 day 8.
day09
Package day09 solves AoC 2021 day 9.
Package day09 solves AoC 2021 day 9.
day10
Package day10 solves AoC 2021 day 10.
Package day10 solves AoC 2021 day 10.
day11
Package day11 solves AoC 2021 day 11.
Package day11 solves AoC 2021 day 11.
day12
Package day12 solves AoC 2021 day 12.
Package day12 solves AoC 2021 day 12.
day13
Package day13 solves AoC 2021 day 13.
Package day13 solves AoC 2021 day 13.
day14
Package day14 solves AoC 2021 day 14.
Package day14 solves AoC 2021 day 14.
day15
Package day15 solves AoC 2021 day 15.
Package day15 solves AoC 2021 day 15.
day16
Package day16 solves AoC 2021 day 16.
Package day16 solves AoC 2021 day 16.
day17
Package day17 solves AoC 2021 day 17.
Package day17 solves AoC 2021 day 17.
day18
Package day18 solves AoC 2021 day 18.
Package day18 solves AoC 2021 day 18.
day19
Package day19 solves AoC 2021 day 19.
Package day19 solves AoC 2021 day 19.
day20
Package day20 solves AoC 2021 day 20.
Package day20 solves AoC 2021 day 20.
day21
Package day21 solves AoC 2021 day 21.
Package day21 solves AoC 2021 day 21.
day22
Package day22 solves AoC 2021 day 22.
Package day22 solves AoC 2021 day 22.
day23
Package day23 solves AoC 2021 day 23.
Package day23 solves AoC 2021 day 23.
day24
Package day24 solves AoC 2021 day 24.
Package day24 solves AoC 2021 day 24.
day25
Package day25 solves AoC 2021 day 25.
Package day25 solves AoC 2021 day 25.
Package y2022 contains the glue and tests for all AoC 2022 days.
Package y2022 contains the glue and tests for all AoC 2022 days.
day01
Package day01 solves AoC 2022 day 1.
Package day01 solves AoC 2022 day 1.
day02
Package day02 solves AoC 2022 day 2.
Package day02 solves AoC 2022 day 2.
day03
Package day03 solves AoC 2022 day 3.
Package day03 solves AoC 2022 day 3.
day04
Package day04 solves AoC 2022 day 4.
Package day04 solves AoC 2022 day 4.
day05
Package day05 solves AoC 2022 day 5.
Package day05 solves AoC 2022 day 5.
day06
Package day06 solves AoC 2022 day 6.
Package day06 solves AoC 2022 day 6.
day07
Package day07 solves AoC 2022 day 7.
Package day07 solves AoC 2022 day 7.
day08
Package day08 solves AoC 2022 day 8.
Package day08 solves AoC 2022 day 8.
day09
Package day09 solves AoC 2022 day 9.
Package day09 solves AoC 2022 day 9.
day10
Package day10 solves AoC 2022 day 10.
Package day10 solves AoC 2022 day 10.
day11
Package day11 solves AoC 2022 day 11.
Package day11 solves AoC 2022 day 11.
day12
Package day12 solves AoC 2022 day 12.
Package day12 solves AoC 2022 day 12.
day13
Package day13 solves AoC 2022 day 13.
Package day13 solves AoC 2022 day 13.
day14
Package day14 solves AoC 2022 day 14.
Package day14 solves AoC 2022 day 14.
day15
Package day15 solves AoC 2022 day 15.
Package day15 solves AoC 2022 day 15.
day16
Package day16 solves AoC 2022 day 16.
Package day16 solves AoC 2022 day 16.
day16/obs
Package obs contains an obsolete, overcomplicated two-agent search solution for AoC 2022 day 16.
Package obs contains an obsolete, overcomplicated two-agent search solution for AoC 2022 day 16.
day17
Package day17 solves AoC 2022 day 17.
Package day17 solves AoC 2022 day 17.
day18
Package day18 solves AoC 2022 day 18.
Package day18 solves AoC 2022 day 18.
day19
Package day19 solves AoC 2022 day 19.
Package day19 solves AoC 2022 day 19.
day20
Package day20 solves AoC 2022 day 20.
Package day20 solves AoC 2022 day 20.
day21
Package day21 solves AoC 2022 day 21.
Package day21 solves AoC 2022 day 21.
day22
Package day22 solves AoC 2022 day 22.
Package day22 solves AoC 2022 day 22.
day23
Package day23 solves AoC 2022 day 23.
Package day23 solves AoC 2022 day 23.
day24
Package day24 solves AoC 2022 day 24.
Package day24 solves AoC 2022 day 24.
day25
Package day25 solves AoC 2022 day 25.
Package day25 solves AoC 2022 day 25.
Package y2023 contains the glue and tests for all AoC 2023 days.
Package y2023 contains the glue and tests for all AoC 2023 days.
day01
Package day01 solves AoC 2023 day 1.
Package day01 solves AoC 2023 day 1.
day02
Package day02 solves AoC 2023 day 2.
Package day02 solves AoC 2023 day 2.
day03
Package day03 solves AoC 2023 day 3.
Package day03 solves AoC 2023 day 3.
day04
Package day04 solves AoC 2023 day 4.
Package day04 solves AoC 2023 day 4.
day05
Package day05 solves AoC 2023 day 5.
Package day05 solves AoC 2023 day 5.
day06
Package day06 solves AoC 2023 day 6.
Package day06 solves AoC 2023 day 6.
day07
Package day07 solves AoC 2023 day 7.
Package day07 solves AoC 2023 day 7.
day08
Package day08 solves AoC 2023 day 8.
Package day08 solves AoC 2023 day 8.
day09
Package day09 solves AoC 2023 day 9.
Package day09 solves AoC 2023 day 9.
day10
Package day10 solves AoC 2023 day 10.
Package day10 solves AoC 2023 day 10.
day11
Package day11 solves AoC 2023 day 11.
Package day11 solves AoC 2023 day 11.
day12
Package day12 solves AoC 2023 day 12.
Package day12 solves AoC 2023 day 12.
day13
Package day13 solves AoC 2023 day 13.
Package day13 solves AoC 2023 day 13.
day14
Package day14 solves AoC 2023 day 14.
Package day14 solves AoC 2023 day 14.
day15
Package day15 solves AoC 2023 day 15.
Package day15 solves AoC 2023 day 15.
day16
Package day16 solves AoC 2023 day 16.
Package day16 solves AoC 2023 day 16.
day17
Package day17 solves AoC 2023 day 17.
Package day17 solves AoC 2023 day 17.
day18
Package day18 solves AoC 2023 day 18.
Package day18 solves AoC 2023 day 18.
day19
Package day19 solves AoC 2023 day 19.
Package day19 solves AoC 2023 day 19.
day20
Package day20 solves AoC 2023 day 20.
Package day20 solves AoC 2023 day 20.
day21
Package day21 solves AoC 2023 day 21.
Package day21 solves AoC 2023 day 21.
day22
Package day22 solves AoC 2023 day 22.
Package day22 solves AoC 2023 day 22.
day23
Package day23 solves AoC 2023 day 23.
Package day23 solves AoC 2023 day 23.
day24
Package day24 solves AoC 2023 day 24.
Package day24 solves AoC 2023 day 24.
day25
Package day25 solves AoC 2023 day 25.
Package day25 solves AoC 2023 day 25.
cmd
aoc
Binary aoc provides all the supported AoC actions (solving, plotting, ...).
Binary aoc provides all the supported AoC actions (solving, plotting, ...).
genmath
Binary genmath extracts TeX code from Markdown files and generates corresponding PNGs.
Binary genmath extracts TeX code from Markdown files and generates corresponding PNGs.
Package glue contains the glue code to link together the different days' solvers.
Package glue contains the glue code to link together the different days' solvers.
Package util contains shared functions for several AoC days.
Package util contains shared functions for several AoC days.
fn
Package fn contains the sort of non-Go-like, occasionally higher-order, utility functions you might find in a functional language.
Package fn contains the sort of non-Go-like, occasionally higher-order, utility functions you might find in a functional language.
graph
Package graph contains utilities for (sparse|dense) (un|)directed (un|)weighted graphs.
Package graph contains utilities for (sparse|dense) (un|)directed (un|)weighted graphs.
ix
Package ix contains small integer arithmetic functions in the style of the standard `math` package.
Package ix contains small integer arithmetic functions in the style of the standard `math` package.
z80
Package z80 is the parent package for all Z80-releated code.
Package z80 is the parent package for all Z80-releated code.
2022
Package y2022 contains Z80 solutions for AoC 2022.
Package y2022 contains Z80 solutions for AoC 2022.
2023
Package y2023 contains Z80 solutions for AoC 2023.
Package y2023 contains Z80 solutions for AoC 2023.
cmd/z80run
Binary z80run executes an AoC Z80 program.
Binary z80run executes an AoC Z80 program.
z80ex
Package z80ex contains Cgo bindings to the z80ex Z80 CPU emulation library.
Package z80ex contains Cgo bindings to the z80ex Z80 CPU emulation library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL