Writing computer programs to play snake is very interesting! Here's an overview, which I have many thoughts on including a straightforwardly implementable clear improvement (thread)
A much algorithm thing which works by dividing the board into 2x2 cells which makes calculation easier for reasons is here github.com/twanvl/snake/
The inefficiencies added by the limitation to cells are extremely small and not really worth discussing, there are vastly larger optimizations to be had for much less effort and risk.
When improving something step 1 is always debugging. Here's a situation in which it fails to fill out a region which appears to be an outright bug
Bugs aside and looking at strategy, hugging the walls matters A LOT. If you go directly for the apple you can cut the board in half forcing yourself to go around your whole length to get an apple in the future or even worse having to kill time filling a whole half
Here's a situation in which it goes straight for the apple which is a clear error. It would have had to spend very little time hugging the bottom which would have avoiding having to fill the bottom region immediately after
And here's another one with an even bigger region
In terms of things which it's overlooking it sometimes maneuvers to work around tail which will be gone by the time it matters. For example here it could hug the wall and by the time it gets to the apple the problematic part of the tail will be gone
And here's a similar situation
Handling these things properly in the general case seems to involve deep planning and is highly nontrivial, but I promised you a clear improvement so here it is:
Parts of the tail which you couldn't stomp on even if you headed towards them as the crow flies can be safely virtually trimmed and you can plan out as if they aren't there. This is simple to implement and leads to clearly better behavior in some situations
For example in this situation if it were trimming it would realize that hugging the wall on the left isn't a thing and hugging the right is clearly the way to go
And finally another thing which looks like a bug: Here it was hugging the wall, then decided to go straight for the apple, then realized that was stupid and decided to turn around and hug the wall again with nothing changing
• • •
Missing some Tweet in this thread? You can try to
force a refresh
OpenAI's chatbot doesn't have much experience in the material world
Don't let OpenAI's chatbot take care of your pets
They seem to be updating it in real time so it gives better answers to specific questions than it did just a few hours ago but sometimes small variations can trip it up
Good morning everyone. Today's rant will be about analog audio and some truly maddening myths in that field (thread)
There's a persistent myth that as soon as any step in audio processing is digital the entire thing has been reduced to a lower digital quality and that's what you're stuck with. This is wrong.
The truth is that every step of processing, either analog or digital, reduces quality, and each specific process will have its own effects, but the limits of how little quality can be lost are much better when both the inputs and outputs are digital
There's a myth in the general public that Know Your Customer programs are important for banking. This is incorrect (thread)
KYC has nothing to do with bank auditing and solvency. It is a relatively recent program which is solely for helping law enforcement. To that end it is extremely expensive and ineffective
The thing which really keeps bank together is federal reserve auditing and FDIC insurance. You know, the things which keep them from turning into FTX. KYC didn't start until 1970. It makes up a significant amount of all banking costs with no benefit to bank customers whatsoever
Something which offends me about SBF is that he's a finance bro's notion of a charmingly autistic founder. He plays that role well because he's a finance bro himself (thread)
Here's the chart of SBF's corporate empire. Nobody sets up something like this without damn well knowing that they're up to something shady
Another obnoxious thing is his inability to tie his shoes supposedly being cute. An adult being incapable of tying their shoes is a red flag of someone who doesn't take pride in their work and can't be bothered to do much of anything for themselves
Someone who has not made major charitable contributions, either through money or deeds, can't claim to be an 'effective altruist' any more than they can claim to be a philanthropist
Someone who's starting out their career and plans to do it can claim that they aspire to be an effective altruist some day, or even have direct plans for it, and if they haven't yet made lots of money that's a reasonable claim
If someone had a plan of making lots of money and using it for charity in the end but their investments never panned out I'm even happy to give them the benefit of the doubt that they would have been very generous