Advent of Code Data Files

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
Post Reply
User avatar
jmosk
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Advent of Code Data Files

Post by jmosk »

After learning about the Advent of Code competition at the Dyalog Websinar on Jan 18th, I would like to work on some of the puzzles. Where can I find the data files that are used by those who posted solutions for the 2023 event at https://aplwiki.com/wiki/Advent_of_Code
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
Adam|Dyalog
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm

Re: Advent of Code Data Files

Post by Adam|Dyalog »

You can't find the exact files if they are not included in the code repositories. However, if you log in on https://adventofcode.com then you can download data for each from the corresponding page, which you can get to via https://adventofcode.com/2023. Note that the data is randomly generated for each user, but solutions should of course work on any data.
User avatar
jmosk
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Re: Advent of Code Data Files

Post by jmosk »

Adam|Dyalog wrote:You can't find the exact files if they are not included in the code repositories. However, if you log in on https://adventofcode.com then you can download data for each from the corresponding page, which you can get to via https://adventofcode.com/2023. Note that the data is randomly generated for each user, but solutions should of course work on any data.
Sorry - what I meant to ask is if there is a repository of the sample data given in each puzzle so that you can test your code against it to ensure you get the answer stated.
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
Adam|Dyalog
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm

Re: Advent of Code Data Files

Post by Adam|Dyalog »

You only need one sample input, as the inputs are generally very large and have broad coverage of the spec, so your code will not give the right result if you have not implemented it right.
User avatar
jmosk
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Re: Advent of Code Data Files

Post by jmosk »

I don't believe I am being clear in my question. For Day 1 the test data is:

1abc2
pqr3stu8vwx
a1b2c3d4e5f
treb7uchet

with the answer of 142.

Is there a repository around where one can find this data in a file that your code can use to ensure it gets a result of 142?
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
RichardP|Dyalog
Posts: 33
Joined: Fri Oct 12, 2018 3:05 pm

Re: Advent of Code Data Files

Post by RichardP|Dyalog »

No I do not believe there is such a repository. Those sample inputs are not full puzzle inputs, which require you to be logged in to the site to obtain.

The website also states that the Advent of Code site content is not free to distribute: https://adventofcode.com/2023/about. In general it is not okay to redistribute the puzzle descriptions, sample inputs or full puzzle inputs.

If you want the sample data in a file, you will have to copy and paste it from the site yourself.
Post Reply