Author Topic: Advent of Code  (Read 111496 times)

Re: Advent of Code
« Reply #675 on: 10 December, 2018, 12:03:23 pm »
(click to show/hide)

Re: Advent of Code
« Reply #676 on: 10 December, 2018, 12:05:20 pm »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #677 on: 10 December, 2018, 12:17:48 pm »
(click to show/hide)

(click to show/hide)

Re: Advent of Code
« Reply #678 on: 10 December, 2018, 12:29:00 pm »
(click to show/hide)

(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 #679 on: 10 December, 2018, 10:33:22 pm »
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #680 on: 11 December, 2018, 08:59:50 am »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #681 on: 11 December, 2018, 09:19:59 am »
Day 11 part  2
(click to show/hide)
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Re: Advent of Code
« Reply #682 on: 11 December, 2018, 10:33:27 am »
Day 11 part  2
(click to show/hide)

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

Ben T

Re: Advent of Code
« Reply #683 on: 11 December, 2018, 11:18:02 am »
naive implementation in C++ https://github.com/bjtaylor1/AoC2018/blob/master/Day11/Day11.cpp (link may contain spoiler)
takes about a couple or three seconds

Re: Advent of Code
« Reply #684 on: 11 December, 2018, 02:20:49 pm »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #685 on: 11 December, 2018, 02:44:55 pm »
Day 10 extension  :)
Code: [Select]
position=<679, 117> velocity=<-7, -1>
position=<584, 498> velocity=<-6, -5>
position=<489, 594> velocity=<-5, -6>
position=<109, 310> velocity=<-1, -3>
position=<585, 399> velocity=<-6, -4>
position=<300, 305> velocity=<-3, -3>
position=<680, 211> velocity=<-7, -2>
position=<586, 493> velocity=<-6, -5>
position=<586, 494> velocity=<-6, -5>
position=<397, 398> velocity=<-4, -4>
position=< 18, 683> velocity=< 0, -7>
position=< 19,  18> velocity=< 0,  0>
position=<399, 399> velocity=<-4, -4>
position=< 19,  20> velocity=< 0,  0>
position=<115,  21> velocity=<-1,  0>
position=<591, 402> velocity=<-6, -4>
position=<401, 403> velocity=<-4, -4>
position=<307, 308> velocity=<-3, -3>
position=<498, 305> velocity=<-5, -3>
position=<308, 686> velocity=<-3, -7>
position=<688, 117> velocity=<-7, -1>
position=<404, 586> velocity=<-4, -6>
position=<594, 112> velocity=<-6, -1>
position=< 24, 398> velocity=< 0, -4>
position=< 24, 399> velocity=< 0, -4>
position=<215,  16> velocity=<-2,  0>
position=<216, 491> velocity=<-2, -5>
position=<121,  17> velocity=<-1,  0>
position=< 27, 588> velocity=< 0, -6>
position=< 28,  18> velocity=< 0,  0>
position=<503,  19> velocity=<-5,  0>
position=<218, 495> velocity=<-2, -5>
position=<503, 686> velocity=<-5, -7>
position=<598, 212> velocity=<-6, -2>
position=<601, 223> velocity=<-6, -2>
position=< 31, 319> velocity=< 0, -3>
position=<126, 510> velocity=<-1, -5>
position=<411, 701> velocity=<-4, -7>
position=<221, 227> velocity=<-2, -2>
position=<127, 223> velocity=<-1, -2>
position=<412, 323> velocity=<-4, -3>
position=<697, 419> velocity=<-7, -4>
position=<603, 507> velocity=<-6, -5>
position=<128, 705> velocity=<-1, -7>
position=<318, 326> velocity=<-3, -3>
position=<319, 696> velocity=<-3, -7>
position=<224, 232> velocity=<-2, -2>
position=<130, 696> velocity=<-1, -7>
position=<605, 707> velocity=<-6, -7>
position=< 36, 696> velocity=< 0, -7>
position=<226, 510> velocity=<-2, -5>
position=<606, 518> velocity=<-6, -5>
position=<322, 601> velocity=<-3, -6>
position=<702, 511> velocity=<-7, -5>
position=< 37, 139> velocity=< 0, -1>
position=<513, 601> velocity=<-5, -6>
position=<418, 511> velocity=<-4, -5>
position=<418, 140> velocity=<-4, -1>
position=< 39, 506> velocity=< 0, -5>
position=<609,  36> velocity=<-6,  0>
position=<514, 710> velocity=<-5, -7>
position=<705, 221> velocity=<-7, -2>
position=<705, 131> velocity=<-7, -1>
position=<135, 615> velocity=<-1, -6>
position=<326, 506> velocity=<-3, -5>
position=<136, 319> velocity=<-1, -3>
position=<231, 225> velocity=<-2, -2>
position=< 41, 701> velocity=< 0, -7>
position=<516, 236> velocity=<-5, -2>
position=<137,  31> velocity=<-1,  0>
position=<517, 319> velocity=<-5, -3>
position=<612, 236> velocity=<-6, -2>
position=<613, 506> velocity=<-6, -5>
position=<233, 412> velocity=<-2, -4>
position=<613,  33> velocity=<-6,  0>
position=<613,  46> velocity=<-6,  0>
position=< 50,  54> velocity=< 0,  0>
position=<145, 340> velocity=<-1, -3>
position=<525, 436> velocity=<-5, -4>
position=<620, 152> velocity=<-6, -1>
position=<525, 153> velocity=<-5, -1>
position=<240, 344> velocity=<-2, -3>
position=< 50, 155> velocity=< 0, -1>
position=<430, 156> velocity=<-4, -1>
position=<525, 442> velocity=<-5, -4>
position=<431, 624> velocity=<-4, -6>
position=<432, 624> velocity=<-4, -6>
position=<242, 245> velocity=<-2, -2>
position=< 53, 530> velocity=< 0, -5>
position=<434, 245> velocity=<-4, -2>
position=<625, 435> velocity=<-6, -4>
position=<721, 340> velocity=<-7, -3>
position=<721,  56> velocity=<-7,  0>
position=<351, 255> velocity=<-3, -2>
position=<161, 541> velocity=<-1, -5>
position=<161, 162> velocity=<-1, -1>
position=<352, 730> velocity=<-3, -7>
position=<257, 448> velocity=<-2, -4>
position=< 67, 354> velocity=< 0, -3>
position=<257, 450> velocity=<-2, -4>
position=<162, 166> velocity=<-1, -1>
position=<637, 262> velocity=<-6, -2>
position=<352, 738> velocity=<-3, -7>
position=<448, 159> velocity=<-4, -1>
position=<544, 634> velocity=<-5, -6>
position=<260,  64> velocity=<-2,  0>
position=<736, 444> velocity=<-7, -4>
position=<357,  64> velocity=<-3,  0>
position=<168, 729> velocity=<-1, -7>
position=<367, 741> velocity=<-3, -7>
position=<558, 171> velocity=<-5, -1>
position=< 83,  93> velocity=< 0,  0>
position=<274, 361> velocity=<-2, -3>
position=<369, 473> velocity=<-3, -4>
position=<465, 552> velocity=<-4, -5>
position=<180, 553> velocity=<-1, -5>
position=<370,  93> velocity=<-3,  0>
position=<181, 554> velocity=<-1, -5>
position=<561, 473> velocity=<-5, -4>
position=<752,  80> velocity=<-7,  0>
position=<372, 283> velocity=<-3, -2>
position=<468, 271> velocity=<-4, -2>
position=<373, 188> velocity=<-3, -1>
position=<184, 645> velocity=<-1, -6>
position=<469, 171> velocity=<-4, -1>
position=<279, 172> velocity=<-2, -1>
position=<754, 268> velocity=<-7, -2>
position=<659, 744> velocity=<-6, -7>
position=<184, 650> velocity=<-1, -6>
position=< 89,  81> velocity=< 0,  0>
position=<374, 747> velocity=<-3, -7>
position=<469,  83> velocity=<-4,  0>
position=<564, 559> velocity=<-5, -5>
position=<564, 750> velocity=<-5, -7>
position=<374, 656> velocity=<-3, -6>
position=<279, 562> velocity=<-2, -5>
position=<754, 373> velocity=<-7, -3>
position=<469, 374> velocity=<-4, -3>
position=<564, 565> velocity=<-5, -5>
position=<564, 186> velocity=<-5, -1>
position=<184, 472> velocity=<-1, -4>
position=< 89, 283> velocity=< 0, -2>
position=<280,  75> velocity=<-2,  0>
position=<565,  76> velocity=<-5,  0>
position=<185, 172> velocity=<-1, -1>
position=<375, 743> velocity=<-3, -7>
position=<470, 744> velocity=<-4, -7>
position=<470, 460> velocity=<-4, -4>
position=<566, 455> velocity=<-5, -4>
position=<566, 551> velocity=<-5, -5>
position=<625, 775> velocity=< 3,  2>
position=<626, 490> velocity=< 3,  5>
position=<342, 490> velocity=< 6,  5>
position=<817, 593> velocity=< 1,  4>
position=<342, 784> velocity=< 6,  2>
position=<818, 585> velocity=< 1,  4>
position=<818, 403> velocity=< 1,  6>
position=<344, 396> velocity=< 6,  6>
position=<344, 777> velocity=< 6,  2>
position=<439, 496> velocity=< 5,  5>
position=<249, 592> velocity=< 7,  4>
position=<440, 873> velocity=< 5,  1>
position=<725, 684> velocity=< 2,  3>
position=<915, 305> velocity=< 0,  7>
position=<251, 970> velocity=< 7,  0>
position=<442, 875> velocity=< 5,  1>
position=<917, 306> velocity=< 0,  7>
position=<348, 304> velocity=< 6,  7>
position=<823, 782> velocity=< 1,  2>
position=<634, 494> velocity=< 3,  5>
position=<349, 878> velocity=< 6,  1>
position=<730, 403> velocity=< 2,  6>
position=<920, 309> velocity=< 0,  7>
position=<449, 400> velocity=< 5,  6>
position=<829, 496> velocity=< 1,  5>
position=<449, 687> velocity=< 5,  3>
position=<354, 973> velocity=< 6,  0>
position=<354, 404> velocity=< 6,  6>
position=<544, 880> velocity=< 4,  1>
position=<639, 786> velocity=< 3,  2>
position=<449, 882> velocity=< 5,  1>
position=<544, 408> velocity=< 4,  6>
position=<450, 305> velocity=< 5,  7>
position=<641, 780> velocity=< 3,  2>
position=<927, 400> velocity=< 0,  6>
position=<453, 590> velocity=< 5,  4>
position=<359, 305> velocity=< 6,  7>
position=<359, 401> velocity=< 6,  6>
position=<740, 401> velocity=< 2,  6>
position=<836, 782> velocity=< 1,  2>
position=<362, 783> velocity=< 6,  2>
position=<362, 879> velocity=< 6,  1>
position=<742, 785> velocity=< 2,  2>
position=<743, 974> velocity=< 2,  0>
position=<933, 975> velocity=< 0,  0>
position=<743, 311> velocity=< 2,  7>
position=<269, 973> velocity=< 7,  0>
position=<934, 596> velocity=< 0,  4>
position=<554, 597> velocity=< 4,  4>
position=<839, 978> velocity=< 1,  0>
position=<650, 783> velocity=< 3,  2>
position=<461, 783> velocity=< 5,  2>
position=<937, 878> velocity=< 0,  1>
position=<558, 403> velocity=< 4,  6>
position=<844, 973> velocity=< 1,  0>
position=<655, 498> velocity=< 3,  5>
position=<941, 879> velocity=< 0,  1>
position=<562, 784> velocity=< 4,  2>
position=<658, 689> velocity=< 3,  3>
position=<658, 785> velocity=< 3,  2>
position=<469, 691> velocity=< 5,  3>
position=<849, 977> velocity=< 1,  0>
position=<671, 498> velocity=< 3,  5>
position=<576, 404> velocity=< 4,  6>
position=<291, 785> velocity=< 7,  2>
position=<861, 501> velocity=< 1,  5>
position=<482, 972> velocity=< 5,  0>
position=<387, 692> velocity=< 6,  3>
position=<578, 686> velocity=< 4,  3>
position=<958, 883> velocity=< 0,  1>
position=<389, 591> velocity=< 6,  4>
position=<389, 979> velocity=< 6,  0>
position=<579, 505> velocity=< 4,  5>
position=<295, 401> velocity=< 7,  6>
position=<580, 505> velocity=< 4,  5>
position=<866, 876> velocity=< 1,  1>
position=<866, 315> velocity=< 1,  7>
position=<677, 306> velocity=< 3,  7>
position=<867, 505> velocity=< 1,  5>
position=<393, 686> velocity=< 6,  3>
position=<583, 409> velocity=< 4,  6>
position=<393, 315> velocity=< 6,  7>
position=<394, 401> velocity=< 6,  6>
position=<964, 972> velocity=< 0,  0>
position=<774, 974> velocity=< 2,  0>
position=<394, 314> velocity=< 6,  7>
position=<775, 879> velocity=< 2,  1>
position=<680, 883> velocity=< 3,  1>
position=<490, 979> velocity=< 5,  0>
position=<586, 404> velocity=< 4,  6>
position=<396, 405> velocity=< 6,  6>
position=<871, 786> velocity=< 1,  2>
position=<871, 977> velocity=< 1,  0>
position=<682, 501> velocity=< 3,  5>
position=<588, 406> velocity=< 4,  6>
position=<778, 312> velocity=< 2,  7>
position=<589, 502> velocity=< 4,  5>
position=<495, 977> velocity=< 5,  0>
position=<506, 318> velocity=< 5,  7>
position=<792, 508> velocity=< 2,  5>
position=<603, 401> velocity=< 4,  6>
position=<698, 687> velocity=< 3,  3>
position=<413, 878> velocity=< 6,  1>
position=<413, 974> velocity=< 6,  0>
position=<603, 785> velocity=< 4,  2>
position=<793, 982> velocity=< 2,  0>
position=<889, 971> velocity=< 1,  0>
position=<509, 500> velocity=< 5,  5>
position=<604, 691> velocity=< 4,  3>
position=<414, 407> velocity=< 6,  6>
position=<794, 788> velocity=< 2,  2>
position=<699, 697> velocity=< 3,  3>
position=<415, 306> velocity=< 6,  7>
position=<795, 599> velocity=< 2,  4>
position=<700, 792> velocity=< 3,  2>
position=<701, 496> velocity=< 3,  5>
position=<416, 410> velocity=< 6,  6>
position=<891, 316> velocity=< 1,  7>
position=<797, 505> velocity=< 2,  5>

Re: Advent of Code
« Reply #686 on: 11 December, 2018, 05:09:30 pm »
Day 10 extension  :)

Excellent, found it but will need to work on an algorithm to detect when to stop as I had to manually step through once in the right area to get the exact frame.

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

Ben T

Re: Advent of Code
« Reply #687 on: 11 December, 2018, 09:01:32 pm »
Day 10 extension  :)

Excellent, found it but will need to work on an algorithm to detect when to stop as I had to manually step through once in the right area to get the exact frame.

What does it say then? And at what time (frame)?


(click to show/hide)

You don't need all that - see #669  ...  https://yacf.co.uk/forum/index.php?topic=94710.msg2349625#msg2349625


Re: Advent of Code
« Reply #688 on: 11 December, 2018, 11:18:15 pm »
What does it say then? And at what time (frame)?

(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 #689 on: 12 December, 2018, 12:24:38 am »
Day 11 was nice. I have only got round to it but looked at it briefly at Makerspace tonight. One of my fellow hackers had done it naively and it took a while, so having the benefit of seeing part 2 I realised that
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #690 on: 12 December, 2018, 08:15:37 am »
Day 12. Can't see why my part 2 is wrong.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #691 on: 12 December, 2018, 08:27:40 am »
Day 12. Can't see why my part 2 is wrong.
Nor me.
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Re: Advent of Code
« Reply #692 on: 12 December, 2018, 09:08:58 am »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #693 on: 12 December, 2018, 09:10:52 am »
Day 12. Can't see why my part 2 is wrong.
Nor me.
(click to show/hide)
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Re: Advent of Code
« Reply #694 on: 12 December, 2018, 05:19:05 pm »
(click to show/hide)

Nice.

(click to show/hide)

Re: Advent of Code
« Reply #695 on: 12 December, 2018, 10:50:26 pm »
(click to show/hide)

Nice.

(click to show/hide)

(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 #696 on: 13 December, 2018, 12:00:34 am »
(click to show/hide)

Nice.

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

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #697 on: 13 December, 2018, 12:06:17 am »
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #698 on: 13 December, 2018, 01:13:11 am »
Got it - massive speed up.
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #699 on: 13 December, 2018, 08:10:20 am »
OK, not quite enough
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes