TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

ChatGPT does Advent of Code 2023

185 pointsby luuover 1 year ago

19 comments

Closiover 1 year ago
&gt; I think it&#x27;s as close to the perfect benchmark as you can get.<p>Depends what you are benchmarking for... If you are benchmarking the ability of the solution to solve LEETCODE challenges, that is different to the ability of GPT4 to assist everyday programmers knock out business logic or diagnose bugs.<p>My experience of GPT4 is that it&#x27;s significantly better at the latter than GPT3.5.<p>Additionally, the real test is for me is &quot;Can an average programmer using GPT4 as a tool solve Advent of Code faster than an equally-skilled programmer without an LLM?&quot;.
评论 #38999264 未加载
评论 #39000131 未加载
IanCalover 1 year ago
&gt; ChatGPT never did this: its debugging skills are completely non-existent. If it encounters an error it will simply rewrite entire functions, or more often the entire program, from scratch.<p>Well, it&#x27;s going to need to rewrite functions to add debug due to not having edit capabilities, but I tried this and it absolutely added debug info which it then used to debug issues:<p>In an inner part it added:<p><pre><code> debug_info.append({ &#x27;Hand&#x27;: hand, &#x27;Bid&#x27;: bid, &#x27;Type&#x27;: hand_info[0], &#x27;Sorted Hand&#x27;: hand_info[1], &#x27;Rank&#x27;: rank, &#x27;Score&#x27;: score }) </code></pre> I don&#x27;t know quite what&#x27;s happening but I feel like people constantly say it can&#x27;t do something and the very first thing I try (just asking it to do the thing) usually works.<p>I gave it the hands in the problem statement and the expected result, and the explanation as to why (copy pasted). It ran the code, looked at the debug output, identified the problem and rewrote the function. I&#x27;m not saying it immediately solved the problem, but it easily added debug information, ran the code, looked at the output and interpreted it.
评论 #38999721 未加载
评论 #39008897 未加载
评论 #39003185 未加载
lloydatkinsonover 1 year ago
Of the few I attempted this year I actually used ChatGPT to help me decipher just what the hell the waffling, rambling, windy, unclear, and ultimately superfluous challenge requirements were.<p>I didn’t have the solutions generated by ChatGPT to be clear, I used a prompt along the lines of “take this text and extract it’s requirements and generate bullet points, also make the example inputs and outputs clear”.<p>I did the same for the previous year too, when ChatGPT hadn’t been out for long.<p>I find that a lot more enjoyable and less tedious.
评论 #38999731 未加载
tiscover 1 year ago
What strikes me about ChatGPT is the blatantly wrong answers it can give. I asked ChatGPT to solve a augmented matrix using gaussian elimination, and it failed in this straightforward task spectacularly.
评论 #39000658 未加载
评论 #39007079 未加载
评论 #38999796 未加载
评论 #38999904 未加载
adverblyover 1 year ago
<a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;@mzikmund" rel="nofollow">https:&#x2F;&#x2F;m.youtube.com&#x2F;@mzikmund</a><p>This creator has some excellent videos of chat GPT attempting advent of code.<p>He uses it in a more generous format where he is often giving it multiple attempts and trying to coax the correct answer out of it. He definitely has more success with it than the article, but it is hard to tell how much of that success is due generous assistance and prompting, and so it is hard to know how much the model has actually improved year over year.
评论 #39008983 未加载
评论 #39004248 未加载
amneover 1 year ago
I have an observation not related to chatgpt but to the debugging skills mentioned in the article: indeed I&#x27;ve always felt that most teaching is done on perfect working code. I&#x27;ve never seen an exercise for developing debugging skills. For example: &quot;This Djikstra implementation is finding the wrong path.&quot; and work with students to pinpoint the off-by-one error. I think it would reveal so much more about the implementation details than just explaining how it works. It could be its own topic to explore race conditions, edge case studies and so on.
评论 #38999358 未加载
JacobiXover 1 year ago
I believe this presents a good challenge, as the article mentioned: the problems are unique :) None of them are found in ChatGPT&#x27;s training dataset.
alkonautover 1 year ago
Are these problems unique enough that they couldn&#x27;t have circulated before the AoC where they appear now?<p>I notice that for &quot;novel&quot; code that CoPilot hasn&#x27;t seen before, it&#x27;s mostly useless, but when writing a hobby project which is a path tracer (of which there are probably 1000 implementations on GitHub) it&#x27;s excellent. Which isn&#x27;t surprising. It has seen the exact same function I&#x27;m writing, written 100 times in every language imaginable. There are books on the topic etc.
评论 #39001195 未加载
评论 #39002372 未加载
评论 #39005518 未加载
km3rover 1 year ago
Seeing the other comments, it still leaves me the question if this is a limit of scale or a limit of technology? How much more can LLMs scale up over the next decade?
评论 #38999332 未加载
scrapheapover 1 year ago
What would be really interesting would be to repeated attempt to get get ChatGPT to solve the problems.<p>By that I mean try to solve the Day 1 problem at the point of release, then try to solve it in a fresh ChatGPT session the next day, and then get it to solve it again the day after that, and so for the next couple of months.<p>Do that for each day that it runs for and then see what patterns emerge. Part of me expects it to get better at solving each problem as the rest of us write our solutions and then make them available on the web in some form for it harvest - but it would be interesting to see if that is the case.
评论 #38999372 未加载
评论 #38999462 未加载
jedbergover 1 year ago
I feel like ChatGPT is equivalent to an intern. I&#x27;d be curious to see how well interns do on AoC for comparison with the same level of help.
boxedover 1 year ago
Claim chowder:<p>&gt; The model can unquestionably code. [<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38205052">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38205052</a>]<p>Seems pretty clear most of the fantastic results from before was overfitting. Like every other case. It&#x27;s amazing to me how these models can be caught red handed being overfitted again and again and again, and people don&#x27;t get the memo.
评论 #39001269 未加载
评论 #39001047 未加载
评论 #39007228 未加载
评论 #39001663 未加载
评论 #39003030 未加载
trompover 1 year ago
&gt; Problems start very easy on day 1 (sometimes as easy as just asking for a program that sums all numbers in the input) and progress towards more difficult ones, but they never get very hard: a CS graduate should be able to solve all problems, except maybe 1 or 2, in a couple of hours each.<p>I think this wildly overestimates the programming skills of the average CS graduate. My estimate of the fraction of CS graduates able to do that is closer to 1%.
评论 #39001012 未加载
评论 #39002213 未加载
评论 #39000985 未加载
评论 #39003040 未加载
评论 #39002431 未加载
ddp26over 1 year ago
&gt; I don&#x27;t pay for ChatGPT Plus, I only have a paid API key so I used instead a command line client, chatgpt-cli and manually ran the output programs.<p>But this is much different, and likely much worse, than paid ChatGPT. Code Interpreter does its own debugging-and-revising loop.<p>It&#x27;s bizarre to me that this author wouldn&#x27;t pay $20 one time to evaluate the higher quality product, the one most people would use if they cared about code quality, am I missing something?
评论 #39002052 未加载
评论 #39001817 未加载
评论 #39002677 未加载
评论 #39002140 未加载
评论 #39001909 未加载
评论 #39001771 未加载
评论 #39002958 未加载
评论 #39003036 未加载
inglorover 1 year ago
AoC questions this year were _deliberately written_ to be confusing to LLMs, it&#x27;s not failing because it&#x27;s worse it&#x27;s failing because the questions were written to make it hader for models :]<p>Edit: apparently not, the author is just really good at coming up with ai adverse puzzles. When testing ChatGPT did much better on last year’s puzzles.
评论 #38999339 未加载
评论 #38999160 未加载
评论 #39000854 未加载
评论 #38999337 未加载
评论 #39003076 未加载
评论 #38999634 未加载
评论 #38999652 未加载
评论 #38999079 未加载
评论 #39003063 未加载
gumballindieover 1 year ago
&quot;but it will get better&quot; - person that parrots openai&#x27;s pitch deck.
评论 #38999183 未加载
评论 #39003230 未加载
orzigover 1 year ago
What prompt engineering do people use in real programming situations?
评论 #39003238 未加载
wokwokwokover 1 year ago
The comments about debugging make me sad.<p>It shows that people fundamentally do not understand the tools they are using.<p>Given a book of numbers, here are two tasks:<p>1) copy out the entire book, but replace every prime number with 7.<p>2) write down the list of prime numbers in the book.<p>Which one is easier?<p>LLMs have to generate tokens one at a time, and it’s very very difficult to perfectly generate a set of input tokens <i>except for some tokens</i>.<p>Since you are almost certainly randomising the probabilities to some degree (that’s what temperature does), you’re also asking for both deterministic <i>and random</i> outputs.<p>TLDR: ask LLMs what is wrong with the code.<p>Ask for a diff.<p>Don’t ask for an LLM to refactor, bug fix or annotate code…<p>That’s extremely naive usage.<p>Back to my stupid analogy: “please copy out this book, but fix the numbers which are ‘wrong’”<p>I can hardly complain when I get terrible results can I?
评论 #39000639 未加载
lancebeetover 1 year ago
My impression of the 2023 AoC was that Wastl has spent considerable effort on making it less LLM-friendly this year. Some days, this seems to have been done by adding extra conditions and complications which make the task more difficult for LLMs to parse. Other tasks required studying the input data which is difficult to achieve with an unsupervised LLM. Finally, the first couple of days seemed a lot more difficult this year than previous years, possibly to deter chatgpt users from filling up the leaderboard right away (though this year December started with a weekend which could also be a contributing factor).
评论 #38999503 未加载
评论 #38999158 未加载