{"id":18017000,"url":"https://github.com/fabmax/aoc-2023","last_synced_at":"2025-03-26T19:33:51.311Z","repository":{"id":210516827,"uuid":"726752692","full_name":"fabmax/aoc-2023","owner":"fabmax","description":"🎅 ☃️ Advent of code 2023 in Kotlin! 🎁 🎄","archived":true,"fork":false,"pushed_at":"2024-12-01T11:44:41.000Z","size":282,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T01:23:38.454Z","etag":null,"topics":["advent-of-code","adventofcode","aoc-2023-in-kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T09:45:55.000Z","updated_at":"2024-12-01T11:44:54.000Z","dependencies_parsed_at":"2024-10-30T04:44:02.726Z","dependency_job_id":null,"html_url":"https://github.com/fabmax/aoc-2023","commit_stats":null,"previous_names":["fabmax/aoc-2023"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Faoc-2023","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Faoc-2023/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Faoc-2023/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Faoc-2023/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabmax","download_url":"https://codeload.github.com/fabmax/aoc-2023/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245722807,"owners_count":20661829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","adventofcode","aoc-2023-in-kotlin"],"created_at":"2024-10-30T04:19:52.895Z","updated_at":"2025-03-26T19:33:51.293Z","avatar_url":"https://github.com/fabmax.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moved to [aoc-kt](https://github.com/fabmax/aoc-kt)\nSince I continue to use this repo to solve more puzlles in year 2024, I archived this project and moved its contents.\n\n# Advent of code 2023 (in kotlin)\n\nSolutions to all puzzles of [Advent of code 2023](https://adventofcode.com/2023/)\n\nI was awarded [\"community star\"](https://blog.jetbrains.com/kotlin/2024/02/advent-of-code-in-kotlin-2023-winners/)\nby JetBrains :smile:\n\n## Results\n\nAll [solutions](src/main/kotlin/y2023) work for both parts. There are a few notable days:\n\n- **[Day 5:](src/main/kotlin/y2023/day05/Day05.kt) If You Give A Seed A Fertilizer**\n  \n  Part2 got pretty difficult. I took the lazy option and brute-forced it.\n  The result for part 2 takes about 1 minute to compute.\n\n\n- **[Day 10:](src/main/kotlin/y2023/day10/Day10.kt) Pipe Maze**\n\n  Again difficult part2. I solved it using [PNPOLY](https://wrfranklin.org/Research/Short_Notes/pnpoly.html) a super\n  handy (and short) point inside polygon check algorithm.\n\n\n- **[Day 12:](src/main/kotlin/y2023/day12/Day12.kt) Hot Springs**\n\n  I struggled a lot with part2. After reading a few tips and discussions on that puzzle, I solved it eventually using a\n  [memoized](https://en.wikipedia.org/wiki/Memoization) recursion (what seems to be a common technique but was completely new to me).\n\n\n- **Day 14: Parabolic Reflector Dish**\n\n  This was a fun one! For part 1 I have an [alternative solution](src/main/kotlin/y2023/day14/Day14Kool.kt), which solves\n  the puzzle using physics simulation including fancy 3D graphics. Also runs in the\n  [browser](https://fabmax.github.io/kool/aoc23-day14/) I used [kool](https://github.com/fabmax/kool) for \n  that, my own kotlin 3D game engine :smile:\n\n  For my [regular solution](src/main/kotlin/y2023/day14/Day14.kt) I went for speed instead of elegance: After a few\n  warmup-iterations, the part 2 result completes in under 10 ms (Java 21, Ryzen 7950X, Ubuntu).\n\n\n- **[Day 19:](src/main/kotlin/y2023/day19/Day19.kt) Aplenty**\n \n  Another straight-forward part 1 followed by a pretty difficult part 2. After struggling a bit with range bounds\n  it worked out ok. Just for fun, I also implemented two rather useless brute force approaches: On\n  [CPU](src/main/kotlin/y2023/day19/Day19BruteForce.kt) (estimated time to complete: 2.6 days at 1.13G part checks / second,\n  Ryzen 7950X) as well as on [GPU](src/main/kotlin/y2023/day19/Day19Compute.kt) (estimated time to complete: 1h:34m at 45.1G part checks / second, RTX4080, Windows).\n\n\n- **[Day 21:](src/main/kotlin/y2023/day21/Day21.kt) Step Counter**\n \n  Wow, that was a tough one. In the end my solution is pretty straight forward, but getting there was rough...\n\n\n- **[Day 22:](src/main/kotlin/y2023/day22/Day22.kt) Sand Slabs**\n\n  Not too special, but there's another nice visualization for the brick stack.\n\n\n- **[Day 24:](src/main/kotlin/y2023/day24/Day24.kt) Never Tell Me The Odds**\n\n  Very hard part2. Solved it by approximating the collision times of two hailstones with the rock. Not the most elegant\n  solution but I'm happy with it.\n\n\n- **[Day 25:](src/main/kotlin/y2023/day25/Day25.kt) Snowverload**\n\n  Last one! Find critical edges in a graph. Solved it by finding paths between random nodes and counting the edge\n  occurrences.\n \n  \n## Running the Puzzles\n\nIn order to run the puzzles, you need to place your puzzle input into correctly named `.txt` files in the `inputs/2023/` directory:\nThe implementation expects the day's puzzle input in a file called `day[xx].txt` where `[xx]` has to be replaced by\nthe day number (e.g. `day01.txt` for day 1, `day10.txt` for day 10, etc.)\n\nMoreover, test-input can be specified in separate `.txt` files in the same directory: `day01_test.txt` for day 1's\ntest input and so on. Multiple test inputs for the same day can be given by appending an extra number:\n`day02_test1.txt`, `day02_test2.txt`, etc.\n\nTest input files are expected to start with a single line containing the expected results (if already known):\n```\ntest1=?; test2=?; part1=?; part2=?\n\n[test input here]\n```\nWhere the `?` can be replaced with the expected results for part 1 / part 2 (for test input and main puzzle). You can\nalso keep the `?` or remove the entire entry if the expected result is not yet known. Moreover, if the expected\ntest result is only specified for a single part, only that part is executed.\n\n## Previous Advents of Code\n\nFrom time to time I solve puzzles from the previous years. Solutions are located in their individual packages:\n\n- [y2022](src/main/kotlin/y2022): All solutions for year 2022 (50 stars)\n- [y2015](src/main/kotlin/y2015): Days 1 to 21 for year 2015 (42 stars so far)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabmax%2Faoc-2023","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabmax%2Faoc-2023","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabmax%2Faoc-2023/lists"}