This is my personal repository with my attempts for AoC 2022. This year I will be doing the polyglot challenge, which means that I will be doing each day in different languages. I will also be documenting extraordinary or noteworthy solutions I come across, which may be seen below.
This was more of a challenge than I'd expected. I've never coded in Prolog before, or in any logic-oriented language for that matter, so learning how to use variables and predicates was a bit of a challenge. The main challenge was to actually increment a variable and pass it on, which sounds simple enough, but given the reference orientation of Prolog it became more of a challenge than I expected.
Finding all internal functions and the proper syntax that I should use was also difficult, since the language did not have a lot of documentation and StackOverflow responses were downright confusing at times. In the end, I managed to get a working solution, but in its current state it's not very line efficient. However, I did not regret learning about logic-oriented programming, as it was a very interesting experience.