Author Topic: Advent of Code  (Read 112362 times)

Re: Advent of Code
« Reply #575 on: 21 December, 2017, 11:33:36 am »
Off by one in your iteration count?

Nope, more serious than that, but I got it (took me about 20 minutes to find it but I've been doing some real work for the last couple of hours). 43 minutes from submitting part (a) to submitting part (b). Ugh.

(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #576 on: 21 December, 2017, 02:13:36 pm »
Off by one in your iteration count?

Nope, more serious than that, but I got it (took me about 20 minutes to find it but I've been doing some real work for the last couple of hours). 43 minutes from submitting part (a) to submitting part (b). Ugh.

(click to show/hide)

(click to show/hide)
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

Re: Advent of Code
« Reply #577 on: 21 December, 2017, 03:07:09 pm »
Down to 30s for 21.b. I'd left my test code in there so I was doubling up on the expensive split/combine work for each iteration.

Will work on ways to get this down to <1s if I can in-between bouts of RealWork(TM).

[EDIT] 17s after simplifying some of the steps, still a way to go.
[EDIT] 15.38s and I think I know how to remove a lot of the complexity from here
[EDIT] 5.23s and much simpler now too, enthusiasm for further refactoring is waning
"Yes please" said Squirrel "biscuits are our favourite things."

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #578 on: 21 December, 2017, 03:12:14 pm »
Calculating part 2 from scratch took <20secs with my rather naive implementation. Adding in the minor optimisation of adding patterns as you find them took it down to sub 14s from scratch.

(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Ben T

Re: Advent of Code
« Reply #579 on: 21 December, 2017, 04:27:58 pm »
55 seconds. Probably some optimizations but possibly marginal gains.
Was hoping it would  create a christmas tree but it didn't.
(click to show/hide)

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #580 on: 21 December, 2017, 05:10:14 pm »
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

Re: Advent of Code
« Reply #581 on: 21 December, 2017, 11:55:15 pm »
Day 21, part 2 took my computer 4.637 seconds
(click to show/hide)
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #582 on: 22 December, 2017, 12:47:27 am »
(click to show/hide)
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #583 on: 22 December, 2017, 09:12:45 am »
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Ben T

Re: Advent of Code
« Reply #584 on: 22 December, 2017, 11:56:18 am »
(click to show/hide)

Re: Advent of Code
« Reply #585 on: 22 December, 2017, 12:33:25 pm »
(click to show/hide)

Late to it today as I was helping set up a family party.

(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #586 on: 22 December, 2017, 12:58:06 pm »
(click to show/hide)

They have been a little bit samey. Maybe a new thread with some 'extra' puzzles on?
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #587 on: 22 December, 2017, 01:22:29 pm »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #588 on: 22 December, 2017, 03:15:11 pm »
(click to show/hide)

They have been a little bit samey. Maybe a new thread with some 'extra' puzzles on?

Agree, unlike last year, there hasn't been any this year that I have found hard. Some fairly 'involved', that took a few hours, but nothing more than that.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #589 on: 22 December, 2017, 03:27:44 pm »
OK, new thread started. I'll throw some data up for the first in due course.
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #590 on: 22 December, 2017, 03:46:55 pm »
(click to show/hide)
Quote from: tiermat
that's not science, it's semantics.

Ben T

Re: Advent of Code
« Reply #591 on: 22 December, 2017, 04:01:28 pm »
(click to show/hide)

Re: Advent of Code
« Reply #592 on: 22 December, 2017, 06:35:40 pm »
(click to show/hide)

(click to show/hide)
Quote from: tiermat
that's not science, it's semantics.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #593 on: 22 December, 2017, 07:59:19 pm »
I did the same as Ben T.
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #594 on: 22 December, 2017, 10:09:35 pm »
(click to show/hide)

Got it!

My code was doing exactly what I expected, apart from the input data importer, which had a mistake in my regexp so that I was truncating the z coordinates to one digit only.

(click to show/hide)
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #595 on: 23 December, 2017, 09:26:58 am »
Day 23 part A is straightforward

Part B:
(click to show/hide)
ETA: Where was I going wrong? An inability to count the number of zeros. *blush*
And then an off by one errror
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #596 on: 23 December, 2017, 10:16:08 am »
(click to show/hide)
Quote from: tiermat
that's not science, it's semantics.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #597 on: 23 December, 2017, 10:34:24 am »
(click to show/hide)
That is why it is in (ETA: now multiple) spoiler tags.
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #598 on: 23 December, 2017, 11:34:22 am »
(click to show/hide)
Quote from: tiermat
that's not science, it's semantics.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #599 on: 23 December, 2017, 11:45:42 am »
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes