Die Holländer 49 Posted December 9 56 minutes ago, JohnLM said: But I did spot another error. But is not a bug. I miss-used the Random() function. Share this post Link to post
corneliusdavid 220 Posted December 9 5 hours ago, JohnLM said: What is part 2 that you are talking about? Another puzzle? There are two puzzles each day, the second is not revealed until you submit a correct answer for the first. 5 hours ago, JohnLM said: I believe I have that part worked out. This is not code, it is just my way for me to keep track of the logic for Inc/Dec directions, visually and mentally. { given the array for levels [1 3 2 4 5 ] 1 and 3 = low to high is increase (RT) 3 and 2 = high to low is decrease (LT) } But there are twists as you said. Yes, this works for these simple cases but what if the first number is higher than the second (making you think it's decreasing), but all the rest of the numbers after that are increasing? Well, it's an invalid row and you throw it out, right? What if there was a modification to that rule where in some cases you wouldn't throw that row out? It would change how you need determine increasing/decreasing. Share this post Link to post
pmcgee 23 Posted December 10 I made a quick video of an (unsolved atm) part I liked of Q5-2 ... 1 Share this post Link to post
pmcgee 23 Posted December 11 I was following an idea that I had thought of yesterday ... and now have the form of the solution. I was assuming the data was less strictly complete than it is, so in reality it's not so hard actually. Share this post Link to post
JohnLM 22 Posted December 12 Update. . . I have finally completed the Day-02 puzzle. I started on these puzzles a week later, so I am behind, not to mention, slow. Because I am a thorough type person, for me, the tricky parts were in determining what items were: Increasing, Decreasing, Inc/Dec, or the Same (c for 'center'), and capturing the value amounts for the Inc/Dec etc., and then reporting those as detail in the final report. I just need to clean up the output view and make a few changes to the UI and Report view. Hopefully, I will show the results later today. 1 Share this post Link to post
corneliusdavid 220 Posted December 12 I've been going slow, too (busy). I was stuck on Day 04 for quite awhile, thought I had it late last night and submitted an answer--but it was too low. I finally decided to look at some of the other answers on Reddit and found I had been making it way too hard on myself--nearly every other answer (no matter the language) approached it in a similar way and much simpler than my attempt. I haven't had time yet to redo my program (nor the heart to throw away all that work--even though it's wrong). One thing I read on Reddit was a big note that reminded people that if you post your answer anywhere online, DO NOT post your input file! There are different input files for different users on Advent of Code and your input should not be shared with anyone else--solutions should work regardless of the input file and will have different answers. Also, don't post the puzzle text input (I need to go remove the texts from my repositories). Share this post Link to post
JohnLM 22 Posted December 13 Sorry Cornelius, I don't understand you point on "input file". what is it? And for different users? Anyway. I was not sharing my source code, if that is what you mean. Actually, I would be ashamed to show it. Also, I see no reason why I can not show my output log or report or final outcome, not when the website already shows it in their instructions. >> Also, don't post the puzzle text input I don't understand what you are saying. I'm getting ready to work on the Day-03 puzzle--I took a cellphone screenshot of the instructions and read it last night at work--It seems easy enough. Just some parsing of the string. And I read (on reddit) that people were getting double-lines and were processing it wrong. And, no--I am not looking for answer on how to solve it or any other puzzle. I would not read those if they are available, though those are in another language that I don't understand, nor how to read anyway. Also, question: where are the second parts I keep reading about? I read bits here and there about part 1 and part 2. But I don't see them in any of the days I have seen aready, 1-3. Or do you have to be at the website at a certain time to see it? I don't know. Share this post Link to post
corneliusdavid 220 Posted December 13 Just now, JohnLM said: I don't understand you point on "input file". what is it? And for different users? Many people post their code solutions on Github to share and discuss with others; some include everything, even the input files and the instructions for the puzzle. This was a reminder on the Reddit site (where a lot of solutions are posted) not to include the instructions and input data. There are several different sets of input files and they generate different numbers; you're not supposed to share the input file generated for your unique login to AoC. 5 minutes ago, JohnLM said: where are the second parts I keep reading about? I read bits here and there about part 1 and part 2. But I don't see them in any of the days I have seen aready, 1-3. Or do you have to be at the website at a certain time to see it? When you submit a correct answer to the first puzzle for a particular day, you get revealed a second puzzle for that day (there are only two per day). You don't see it until you correctly answer the first part--and the second one is always some twist to the first puzzle and uses the same input file. If you don't see any of them, then you haven't submitted any correct answers. You don't have to be at the website at a particular time but they aren't revealed ahead of the day for the puzzle. 1 Share this post Link to post
JohnLM 22 Posted December 13 @corneliusdavid, ah, now I understand, since I am not a member of AoC, nor registered participant. I am an outsider just playing along as best I can. Also, I found this website: https://jeroenheijmans.github.io/advent-of-code-surveys/ I did not see any Delphi / Pascal language mentioned. Looks like there are very few people (including myself--day1 and 2 puzzles solved) in this language tackling AoC. 1 1 Share this post Link to post
corneliusdavid 220 Posted December 13 @JohnLM Cool website--interesting graphs! Share this post Link to post
pmcgee 23 Posted December 17 Personally, I post everything that it takes to recreate my answer. And any sundry files (like Excel) I might employ to help along the way. Reproducible Research™ 🙂 Quote I haven't had time yet to redo my program (nor the heart to throw away all that work--even though it's wrong). Ha. I feel this pain. 😅 I have often found my code volume increasing like an expanding balloon ... until I have worked out what I should have been doing, then the cutting away begins ... and 80 lines drops back to 20. I have this currently in my solution for Problem 5 Part 2. 60 out of 120 lines became unnecessary as I realised the information I needed to gather ... but the exploration process was necessary to come to that understanding in the first place. 🙂 1 Share this post Link to post
JohnLM 22 Posted yesterday at 06:26 AM Looking at the stats in the Leaderboard for AoC 2024 Day 23 'LAN Party' -- does the time completion listed below mean he finished in 21 minutes ? 1) Dec 23 00:00:21 ChristophGreger Share this post Link to post
Uwe Raabe 2064 Posted yesterday at 01:11 PM I would rather say that are 21 seconds (which is probably less than I actually need to just read the description). This is backed by this quote from the About text: Quote Depending on the puzzle, that day's leaderboard usually fills up anywhere between two minutes and an hour. Since the start time of each puzzle is way out of my awake periods a day, I can thankfully ignore the ranking system completely. This allows me to concentrate on finding a suitable solution, sometimes even a clever one. 1 Share this post Link to post
JohnLM 22 Posted 22 hours ago (edited) re: Day-23 puzzle -- Note, I am not complaining but giving my observations thus far. I don't know. I mean, it took me a moment to read through the instructions, about 1m:48s. If I added that to my final time it took me to solve that puzzle, then it was 14 minutes to solve. I was thinking 12 minutes and thought I could have made that Leaderboard--just joking. And that includes the building of the app, which I over-do too much in, everytime. Oh well. I am usually pretty quick at thinking for a solution and then writing down (building) the code. Well, there was a least two puzzles that I did solve. And sometimes I will solve a puzzle during the coding part as I am building and working out the code, it may come to me. But then I find issues or I don't quite like it, etc. etc.. I believe that the languages those people are using are a lot more sugar-coated in solving the puzzles in AoC2024. Take for example, Day 20's puzzle. I watched most of this YT video: "tWhwcORztSY" and saw how supper quick this person was at solving it, not to mention his detailed step-by-step description of how he was solving different parts and how fast he was writing out the code. I mean, the guy sounded like he wrote the puzzle! Now mind you, I was not trying to solve that puzzle. Reading through that puzzle part-way was enough to tell me I would never solve it at the time I was reading it. I still believe that today, even after watching a video of it. If you look at the Leaderboard for Day 1's puzzle, you will see a time reading of "1) Dec 01 00:00:04 - qianxyz (AoC++)". No way anyone could complete it after reading, writing and submitting in 4 seconds. That's got to be 4 minutes. I believe that the time layout I showed in my last post for "00:00:21" is: Days/Hours/Minutes. As much as I could not solve most of these puzzles--and that's okay--I have enjoyed trying to solve them, to date. I am still trying to solve some, while others are on the back-burner and I will eventually get back to those. I have very much enjoyed this adventure. It gave me a chance to challenge myself and enjoy each day's puzzles. I looked forward to each puzzle with antisipation every day, with only two days/puzzles left. Edited 21 hours ago by JohnLM typos / and the video for day-20, not day-23 puzzle Share this post Link to post
JohnLM 22 Posted 21 hours ago Note, in my previous post above, that the video I was talking about was for Day 20, not Day 23. Share this post Link to post
corneliusdavid 220 Posted 21 hours ago 28 minutes ago, JohnLM said: If you look at the Leaderboard for Day 1's puzzle, you will see a time reading of "1) Dec 01 00:00:04 - qianxyz (AoC++)". No way anyone could complete it after reading, writing and submitting in 4 seconds. That's got to be 4 minutes. That's what I think--I just don't see how that can be. After initially looking at the leaderboards and trying a couple of puzzles with some faint hopes of my abilities, I quickly realized I would never make it anywhere close to a leaderboard and stopped looking at them! LOL! Now I'm just happy if I can SOLVE a puzzle; and especially happy if I also solve part 2! 22 minutes ago, JohnLM said: I believe that the languages those people are using are a lot more sugar-coated in solving the puzzles I have come to believe that Delphi is not the best language for solving puzzles like this--at least in a contest of speed. The Pascal language is very type-strict and I find myself many times having to convert numbers to string or vice-versa. I get boxed in thinking only in terms of strings (then having to extract or convert a number) or thinking only in terms of number (then having to concatenate a string or something). Several additions to the RTL over the years have helped but I look at some of these 1- or 2-line Python or Go solutions and just shake my head, partially to try and understand them but also because you just can't always do stuff that succinctly in Delphi. Either that or I'm just so used to laying out variables and record structures and doing things in a "proper" way for code readability and maintainability that it's hard for me to get in the mind-set of being super terse and brief to solve a very specific problem where there's no need to do any checking of the input data. Share this post Link to post
pmcgee 23 Posted 20 hours ago The speed thing is addressed in the 'Behind the Scenes' video ... people who are the Olympic athletes at this event have entire solution systems pre-prepared for reading in and manipulating data, and then solving the puzzle. The head guy mentions that people will blast through, ignoring the text, maybe even guessing at the problem being asked in the quest for a fastest solution. He specifically says that that endeavour is not "programming" as such ... it's an entirely different beast. Share this post Link to post
corneliusdavid 220 Posted 20 hours ago 5 minutes ago, pmcgee said: The speed thing is addressed in the 'Behind the Scenes' video ... people who are the Olympic athletes at this event have entire solution systems pre-prepared for reading in and manipulating data, and then solving the puzzle. Yeah, that helped me not feel so bad! I'm not in this for a gold medal, I'm happy if I can figure it out on my own given the time constraints of job, family, etc. Share this post Link to post
JohnLM 22 Posted 19 hours ago I liked the Day 19 and 23 puzzles. They were easy to solve, but 19 was solved while I was at work while I was walking out into one of my isles to pack out products and where it came to me, but getting it out in code is still a challenge. I know what I have to do but coding it is a real challenge. And as for 23, I did solve it in around 12 minutes, but I found a "cosmetic" bug in the output and I am trying to fix that. Both of these are just part 1. Share this post Link to post
corneliusdavid 220 Posted 18 hours ago 45 minutes ago, JohnLM said: I liked the Day 19 and 23 puzzles. I haven't had time to get past #11, which I rewrote using a recursive function for part 2 but then found out that was foolish--I killed it after letting it run for 24 hours! My favorite (so far) was #3; if you know regular expressions, it was snap. I hope to have some time over the holidays to tackle a few more. Share this post Link to post