484
Coding chess (startrek.website)
you are viewing a single comment's thread
view the rest of the comments
[-] CeeBee@lemmy.world 49 points 9 months ago

I really hope this is satire. Otherwise I'm scared to ask how long it took.

[-] Researchgrant@lemmy.world 91 points 9 months ago

It's definitely satire. 2 million lines of code is an absurd under-exageration. This post had me looking up the number of possible chess games, because if you coded chess like above you would have to have an if statement for every outcome, and it's 10^120 different possible games.

https://en.wikipedia.org/wiki/Shannon_number

[-] Taalen@lemmy.world 45 points 9 months ago

The way I understood it, it's two million lines and nowhere near finished.

Anyway, satire.

[-] PeriodicallyPedantic@lemmy.ca 6 points 9 months ago* (last edited 9 months ago)

That's the number of possible games, the number of possible board states is much lower, 10^40.

Although you're still clearly correct in the end anyways because it's still an absurd number of board states and it's not even formatted to be one state per line.

[-] safesyrup@feddit.ch 3 points 9 months ago

I read that there are less atoms in the universe than possible chess games, which is quite insane

[-] chetradley@lemmy.world 16 points 9 months ago

By an extremely significant margin. Here's another fun one: getting a unique shuffle in a deck of cards is 1/52!. So if you wanted to count all of the different possible arrangements of cards, counting one per second, you can:

Start walking around the equator at a leisurely pace of one step per billion years.

Once you've made it around the earth, remove a single drop of water from the Pacific Ocean and walk around the earth again.

Once the Pacific Ocean is empty, re-fill it and lay a sheet of paper on the ground. Keep stacking a new sheet every time you've re-emptied the ocean drop by drop every time you circle the earth at one step every billion years.

When the stack of paper reaches the sun, you're about a third of the way there!

[-] hakase@lemm.ee 9 points 9 months ago* (last edited 9 months ago)

The way I like to put it is that every single time you randomly shuffle a deck of cards, you are guaranteed to get an order that has never been seen before, by anyone in history. That will be the case for every person who ever shuffles a deck of cards for the rest of time.

[-] Ookami38@sh.itjust.works 5 points 9 months ago

To be fair there was that one time a perfect shuffle led to a perfect bridge deal, each player getting a full suit. Sometimes even a fair shuffle goes weird lol.

[-] flames5123@lemmy.world 3 points 9 months ago

You only have to code a fraction of those as the computer should take the same move for several of the user inputs.

load more comments (26 replies)
this post was submitted on 29 Jan 2024
484 points (98.4% liked)

AnarchyChess

5163 readers
43 users here now

Holy hell

Other chess communities:
!Chess@lemmy.ml
!chessbeginners@sh.itjust.works

Matrix space

founded 1 year ago
MODERATORS