r/adventofcode • u/lele3000 • Dec 13 '19
Visualization [2019 day 13 (part 2)] Didn't really feel like playing breakout so I just adjusted the rules slightly.
71
Upvotes
r/adventofcode • u/lele3000 • Dec 13 '19
15
u/hahncholo Dec 13 '19
Genius. My dumb ass spent an hour hooking up input to and writing a game AI, you just wrote a floor.
9
u/SatNav Dec 13 '19
Nice! I hooked my render function back to the input function - if the paddle was ever not under the ball, the next input would move it there :D
4
u/Meowth52 Dec 13 '19
I extended the paddle. I have it find a 3 in the instructions surrounded by zeros and the work myself left and right from there to extend the paddle to the walls.
3
u/vkasra Dec 13 '19
I did something similar: I logged all instructions as they were executed, so that I could see which addresses the machine was loading the ball and paddle positions from. Then I redirected lookups of the paddle position to the address of the ball position.
2
u/aardvark1231 Dec 13 '19
I had thought of doing this, but I didn't want to look through Intcodes thinking it would be difficult. When I did look at it later, I realized how easy the change would have been to make... Kinda slapping myself for not taking this approach and derping around trying to actually play the game.
2
u/jimbo_sweets Dec 13 '19 edited Dec 13 '19
I did the same thing and was surprised when most people wrote an AI 😅
1
u/AlphaDart1337 Dec 31 '19
Fun fact: I had a bug in my intcode interpreter which caused me not to lose the game when the ball went out of bounds (my dumb-ass thought this was intended).
BUT I couldn't complete it by letting the ball bounce around freely because it would enter a loop of not hitting anything, with 3 or 4 blocks remaining.
0
u/[deleted] Dec 13 '19
[deleted] — view deleted comment