• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Advent of Code 2020

 
Marshal
Posts: 5112
319
IntelliJ IDE Python Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In typical fashion my momentum is slowing down as available time diminishes. I've made it further this year than any previous year so I'm happy with that.

I expect some further tinkering will be happening as and when time permits.

Happy advent everyone! Thanks for playing.
 
Sheriff
Posts: 8090
569
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim again for bringing this AoC to our lives, yet another great time of the year. And thanks to all colleagues here for having fun together.

 
Saloon Keeper
Posts: 13366
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll probably move on with it later next week, the problem is that besides Christmas, there are a lot of birthdays among my family and friends and many things to do at the office this time of year.

I love AoC, I just hate that it's in December.
 
Bartender
Posts: 4667
183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, enthousiasm seems to fade away. Here too, as I wrote.

Just finished day 18, a nasty looking exercise. Thought of a brilliant parser, and all the examples I gave it worked fine. But of course, my answer for A was turned down! By the formulation ("your answer is too low") you can tell you're close, but that is not much help. Somewhere in the input there is a line that I evaluate wrong, but what line is that? The only way was to come up with a completely new parser, and that parser turned out to be a lot simpler that the previous parser, and it worked also with little adjustment for part B!

Now trying to find energy for day 19...
 
Tim Cooke
Marshal
Posts: 5112
319
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Had a nosey at today's puzzle (Day 22)
  • Part 1: Yea that looks totally doable, let's go for it.
  • Part 2: Nah, I'm out
  •  
    Piet Souris
    Bartender
    Posts: 4667
    183
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    About day 20. We are given 100 10x10 tiles (2D arrays), and these tiles form a big 100x100 tile. However, to make things not too simple, all these 10x10 tiles may be rotated or flipped at will. Part A asks to determine the four cornertiles, which is not difficult. However, part B asks nothing less than to reconstruct the big picture and to look for cerain patterns.

    I have been thinking about a way to get that done, like:
    - start with one of the corners.
    - find its two neighbors. Since you know what borders they have in common, it is possible to set these neighbors in their correct position by rotating/flipping
    - et cetera, until done.

    But that is quite a task, and a difficult one. Let alone searching for these patterns. Anyone with a simpler solution?
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13366
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    No. That's the solution I came up with as well.

    Just find one corner. Then find two other pieces that it borders with so you know how to orient it. After that you reconstruct the topmost row and the leftmost column. Then for each remaining empty spot you can easily figure out what remaining tile goes there by comparing it to the piece above and the piece left to it.

    It's a lot of work, but not super difficult.
     
    Piet Souris
    Bartender
    Posts: 4667
    183
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I just finished part B, albeit that my answer is incorrect.

    I started with a random tile, that I defined to be aligned and gave it location (0, 0). Then found all its adjacents, aligned them, gave then the correct location (-1,0 0r 0,1 etcetera, and went on with these adjacents in a queue.

    Then tried to find one or more seamonsters in any of the eight possible orientations of the big tile, and that should do the trick.

    A lot of possibilities to go wrong somewhere: in the test I found no seamonsters. As you say, in principle not difficult, but very very much work.

    Hope I find the bug tomorrow.
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13366
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Take special note of this part of the puzzle description:

    When looking for this pattern in the image, the spaces can be anything; only the # need to match.

     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13366
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    If the particular solution to my input is anything to go by, all sea monsters can be found in a single orientation of the complete image, and they don't overlap.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic