News for hackers. Stuff that matters.
Re:The Kilobyte’s Gambit by GCA10 on Sunday March 07, 2021 @06:25PM (#26380781)
Nice work!

I'm about 1850 in Lichess blitz, and it played at the level of an earnest 12 year old, which is actually meant as a compliment. It got crazy with its kingside pawns in the opening (no book knowledge), lost material pretty steadily and was checkmated down a queen, bishop and two pawns by move 25.

But it developed some pieces sensibly, made obvious recaptures and was not reckless about king safety. It avoided pointless toggling moves and suicidal piece jettisoning.

You've earned the right to be a proud papa on this one.

Re:The Kilobyte’s Gambit by angry_octet on Monday March 08, 2021 @01:28AM (#26382797)
What you're saying is I'm getting crushed by an earnest 12 year old. Oh dear.
Re:The Kilobyte’s Gambit by dandanua on Monday March 08, 2021 @03:53AM (#26383538)
There are 12 years old grandmasters in the history of chess.

The truth is you've been crushed by 1kb javascript code :)

Re:The Kilobyte’s Gambit by wdiamond on Tuesday March 09, 2021 @09:54AM (#26399337)
sounds the same for viruses and human kind.
Re:The Kilobyte’s Gambit by haskal on Sunday March 07, 2021 @09:35PM (#26381824)
If you play a defensive setup like push D, E pawns one step ahead, fianchetto both the bishops, try to castle early, the computer just flings all the pawns forward, even from the king side: https://imgur.com/a/Nt4x7TP

Anti-computer tactics in chess: https://en.wikipedia.org/wiki/Anti-computer_tactics

EDIT: GothamChess used a similar system to defeat a bot: https://www.youtube.com/watch?v=l5MD6hn5PgI (from 1:59)

Re:The Kilobyte’s Gambit by sickygnar on Monday March 08, 2021 @12:31AM (#26382564)
the almighty hippopotomus. love playing it against humans too (with limited success)
Re:The Kilobyte’s Gambit by jkonline on Monday March 08, 2021 @07:07AM (#26384825)
"Hip... Hip hop... Hip hop Anonymous?"

Your comment reminded me of one of my favorite scenes from the great movie, Big Daddy.

https://youtu.be/KnbL56_S9rQ

Re:The Kilobyte’s Gambit by jbluepolarbear on Sunday March 07, 2021 @09:15PM (#26381737)
It’s a pretty decent model for the size. If I played like I’ve never played before it beats me pretty well, if I play defensive at all it gives me pieces until I checkmate.
Re:The Kilobyte’s Gambit by chki on Sunday March 07, 2021 @06:32PM (#26380828)
I agree. I'm at a similar chess rating level, I would add that it is very weak in the endgame. I guess if it only looks four moves into the future it's difficult to see pawn promotions.
Re:The Kilobyte’s Gambit by SubiculumCode on Sunday March 07, 2021 @07:41PM (#26381204)
I'm of similar rating on Lichess, and agree with the above comments. To be honest, any difficulties I encountered were due to unfamiliarity with the look of the pieces. Still, it was fun.
Re:The Kilobyte’s Gambit by register on Monday March 08, 2021 @12:30AM (#26382562)
It looks one-two semi-moves ahead at maximum.
Re:The Kilobyte’s Gambit by YeGoblynQueenne on Monday March 08, 2021 @04:12AM (#26383641)
"ply" :)

The "How it works" link says it looks ahead 4 moves, that's probably 2 ply.

Re:The Kilobyte’s Gambit by mattround on Monday March 08, 2021 @04:18AM (#26383665)
I was a bit lax using 'moves', it's 4 ply, so that's 2 full moves.
Re:The Kilobyte’s Gambit by YeGoblynQueenne on Monday March 08, 2021 @02:10PM (#26390127)
Oh, hey, you're the developer, right? Thanks for clarifying :)

Can you say what the lookahead is like? Is it a version of minimax?

Re:The Kilobyte’s Gambit by Vaslo on Sunday March 07, 2021 @11:15PM (#26382237)
I played like an earnest 3 year old I guess and lost.
Re:The Kilobyte’s Gambit by lgeorget on Monday March 08, 2021 @02:18AM (#26383042)
There are some pretty good three-year-old players out there... https://youtu.be/2N4t0EBSg1w
Re:The Kilobyte’s Gambit by strken on Sunday March 07, 2021 @06:34PM (#26380850)
For those of us who have no idea how to play chess, what level does an earnest 12 year old play at?
Re:The Kilobyte’s Gambit by lucb1e on Sunday March 07, 2021 @08:59PM (#26381642)
I joined my girlfriend to a chess tournament of the local club once. Old vs. young. They were an adult short, and I know the rules, so I volunteered to play - otherwise there would be a kid without an opponent every round (my plan had been to write some code in a corner, but entertaining the kids, why not right?).

I lost every game. The kids were something like 10 years old. Admittedly, I know little more than the rules, but I expected to at least give one or two of them trouble by playing logical. Not so...

They had the best time, seeing in how many moves they could beat me. In my last game I tried an unusual (okay, stupid) opening hoping to at least break any pattern they have, but that just made me lose even faster. Be weary of 12-year-olds if they're playing in a chess club!

Re:The Kilobyte’s Gambit by galkk on Monday March 08, 2021 @05:05AM (#26384034)
Sergei Karjakin became grossmeister at age 12
Re:The Kilobyte’s Gambit by BlackLotus89 on Sunday March 07, 2021 @07:01PM (#26380998)
What op probably meant was that the engine knows no theory, but can See when something can be taken and can think a few steps ahead.

Not sure if I agree completly, but since you can win in under 10 moves simply focusing on an attack in the king I know what he means (wasn't quite a fools mate, but couldn't protect the Kings side)

I think that a 12 year old would play Mord reckless and would make more obvious mistakes. I think this is at the level oft a self taught novice that only played against another self taught novice (funny enough I was thinking of when I player chess against my friends when I was 12...) good times

Re:The Kilobyte’s Gambit by jrumbut on Sunday March 07, 2021 @08:25PM (#26381467)
I'm getting a kick out of this thread because, having hardly played chess since age 12, this game instantly reminded me of games in the middle school library.

It seems like there's broad agreement on skill level.

Re:The Kilobyte’s Gambit by sdenton4 on Sunday March 07, 2021 @07:36PM (#26381183)
Yeah, just tried a fool's mate! It didn't /quite/ work, but pressing on still led to a very early mate, after dealing with an inconvenient pawn. (I think about 15 moves total?)
Re:The Kilobyte’s Gambit by cout on Sunday March 07, 2021 @09:09PM (#26381708)
I settled for the second trick newcomers learn -- forking the Queen and the Rook with the Knight. Easy win being up a Rook and Pawn to a Knight, with the black's King uncastled and in the open.

I expected it to play like Ed's Chess on DOS, which I always had trouble beating. IIRC that engine looks 3-4 moves ahead usually, but 6-7 moves ahead when it needs to. No idea how big the equivalent JS would be.

Re:The Kilobyte’s Gambit by fjeifisjf on Sunday March 07, 2021 @09:36PM (#26381827)
Looking ahead more moves requires zero more code -- depth is a loop variable.
Re:The Kilobyte’s Gambit by lgeorget on Monday March 08, 2021 @02:22AM (#26383061)
Well the deeper you look, the more clever you need to be about pruning your branches and exploring the search space, so I would guess it does require more code.
Re:The Kilobyte’s Gambit by nullserver on Sunday March 07, 2021 @06:53PM (#26380962)
Was extremely good at 12. But my dad who thought himself good stopped playing after I won a game by taking everything and losing none. I recall seeking so many possibilities, now I stink at it.
Re:The Kilobyte’s Gambit by radmuzom on Monday March 08, 2021 @10:45AM (#26386916)
I just checkmated in seven moves. e4 h5 Bc4 e5 Qf3 Qe7 Nh3 g5 Nxg5 QxG5 Qxf7+ Kd8 Qxf8+mate