No description
* Improve tests
* Instead of trying to solve against a single target, the challenge
input, go with a set of tests
* Introduce a function that can verify the correctness of setting i-th
bit of the output
* Introduce a function that can generate N random tests to prune the
search space when checking the remaining random combinations
* Group the tests based on the inclusion of already swapped gates
* Handle loops during evaluation of the circuit correctly
* Adjust solver to be able to consume pre-set input wires
* Matchings
* Consume the helper predicate (also fixes a possible bug)
* Part 2
* Bail out on the first set of swaps that passes tests
* Fix an issue with generating random candidates, for the last swap,
that can cause some pairs of gates to disappear (if you count on the
list of available gates for swapping to be sorted and generate pairs,
you need to have both sequences sorted, grrr)
* Adjust iteration through candidates to exit on the first feasible
solution
* When exploring swaps that are constrained by the matching verify the
correctness of a candidate before searching that subspace
Signed-off-by: Matej Focko <me@mfocko.xyz>
|
||
|---|---|---|
| .idea | ||
| gradle/wrapper | ||
| inputs | ||
| src | ||
| .cz.toml | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| build.gradle.kts | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
advent-of-code-2024
Welcome to the Advent of Code1 Kotlin project created by mfocko using the Advent of Code Kotlin Template delivered by JetBrains.
In this repository, mfocko is about to provide solutions for the puzzles using Kotlin language.
If you're stuck with Kotlin-specific questions or anything related to this template, check out the following resources:
- Kotlin docs
- Kotlin Slack
- Template issue tracker
-
Advent of Code – An annual event of Christmas-oriented programming challenges started December 2015. Every year since then, beginning on the first day of December, a programming puzzle is published every day for twenty-five days. You can solve the puzzle and provide an answer using the language of your choice. ↩︎