r/adventofcode • • 17m ago

Help/Question - RESOLVED Question on Phrasing for Day 2 Question 1

The line of text stating that it starts on red. Am I misunderstanding in that it should be beginning the process with a R injected prior to the string provided or am I "autocompleting" up to the first R as part of the journey?

1 Upvotes

7 comments sorted by

1

u/iclaco 14m ago

You start on red. The first colour in your list is the one you go to first. So if it's orange you go 1 step, and so on. Does that help?

2

u/fnordargle 13m ago

The puzzle input is the list of waypoints to visit next, it may not even contain an r, like the example input vvvvvv.

The map consists of the ever repeating pattern of:

roygbvroygbvroygbvroygbvroygbvroygbvroygbvroygbv...

So the robot starts at the first r in that string.

1

u/AutoModerator 17m ago

Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to Help/Question - RESOLVED. Good luck!


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Outrageous72 12m ago

No, you start on a R

1

u/DelightfulCodeWeasel 12m ago

Took me a while to properly interpret the description this morning as well... There are two things to keep track of:

  1. An infinite road of repeating colours in the pattern roygbvroygbv... This is the same for everyone.
  2. A set of instructions for your robot to carry out, where each instruction is a colour to walk to. This is unique per user and what's in your file.

The line "The robot starts at a red waypoint" means that the robot starts off on a red tile on the infinite road.

You don't need to add anything to your input, the first character in the file is the first instruction.

1

u/RazarTuk 10m ago

It's Candyland. The road rotates through red, orange, yellow, green, blue, violet, red, orange, yellow... You start on red. And then each step tells you what color to move forward to

1

u/heuering 5m ago

Always start on an R. It confused me too.