r/ComputerChess • • Oct 22 '26

I built a chess engine that humiliates opponents and it's actually good at it lol

Post image
343 Upvotes

40 comments sorted by

14

u/FewNetwork5539 Oct 22 '26

It would be great if u explained it to us about how it works

25

u/Mithrillic Oct 22 '26

My bot opens with the Bongcloud every game: 1.e4 and 2.Ke2, walking the king out on move two. That part’s hard-coded.

After that it plays normally until it’s crushing, meaning about a rook and a minor piece up or a forced mate. Then it starts looking for funnier ways to win: underpromoting to knights, flashy piece sacrifices, grabbing free material, or pushing pawns up the board to make more knights.

The search still finds the best move first. Trolling only swaps in a funnier move after a second, deeper check shows it still wins clearly.

3

u/GaelicTuna Oct 22 '26

What does it do as black against 1.e4 e5 2.Qh5?

4

u/Mithrillic Oct 22 '26

It used to play Ke7 and get mated hahah, but like a week ago I implemented a fix for it to delay Ke7 until it's safe to do so. So it just calculates the best move

4

u/GaelicTuna Oct 22 '26

What does it do as black against 1.e4 e5 2.Qh5?

3

u/masterlafontaine Oct 22 '26

That's so good! I love it! LOL

5

u/bastarmashawarma Oct 23 '26

As a software engineer I’d love to learn more about the algorithms you used?

By play normally do you mean min max or some fancy way of making it “more human”? How did you come up with the evaluation function?

2

u/mavaddat Oct 25 '26 edited Oct 25 '26

He just altered the Stockfish code base, nothing fancy. No need to reinvent the wheel.

The OP said he wrote the engine from scratch in Rust.

0

u/shmageggy Oct 23 '26

You couldn't write this yourself and had Claude do it for you?

1

u/btherl Oct 24 '26

If you're talking about the comment, it doesn't sound like Claude to me.

1

u/shmageggy Oct 25 '26 edited Oct 25 '26

The search still finds the best move first. Trolling only swaps in a funnier move after a second, deeper check shows it still wins clearly. 

Really? The grammar is so unnatural. I've found that a lot of people just don't perceive it (and I envy you given the amount of this slop that's affecting everything everywhere right now), but for those of us who do, it sticks out like a store thumb.

1

u/AFRIENDISNEAR Oct 26 '26

Maybe they are autistic; we tend to structure sentences in ways others consider abnormal. And they wrote a troll chess engine from scratch in Rust.

7

u/SimpleCanadianFella Oct 22 '26

Besides bongcloud, you need to program in some of the other hyper dubious lines like d4 Nf6 g4 Nxg e4, like regular gambits and then the hyper dubious ones like that

5

u/bebemaster Oct 22 '26

It would also be cool if it took users ELO into consideration and made even more dubious and ridiculous choices at the start. Like 500 elo get to -10 and then come back. 1500 elo get to minus 5 asap and then come back.

2

u/Mithrillic Oct 22 '26

Not a bad idea! Currently it already takes into account enemy ELO in order to decide how much risk it can take with trolling. For example, against a 1500 it will promote to a knight at +5 eval, whilst against a 3000 it must see a forced mate before doing so. Planning on expanding this once I get the engine strength to a satisfactory level

4

u/EntangledPhoton82 Oct 22 '26

Is it available somewhere?

4

u/Mithrillic Oct 22 '26

Yes, Bongaclang on Lichess. Not sure if I'm allowed to post links here, but: https://lichess.org/@/Bongaclang/all

1

u/Old_Patience_4001 Oct 28 '26

Not working anymore for me - when i challenge it just says waiting

1

u/Mithrillic Oct 28 '26

It only plays 1 game at a time, so it was likely already in one! It's running on very limited hardware, so simultaneous games would hurt its performance too much

1

u/Enrico995 Oct 24 '26

What engine?

1

u/Mithrillic Oct 24 '26

Bongaclang, my home-built Rust engine

1

u/mat2923 Oct 26 '26

Are you going to release the source for this? Under GPL perhaps?

1

u/Mithrillic Oct 26 '26

I might eventually, but I'm keeping it closed for now. Thing is, I'm still developing and improving, curious to see how far I can push it first. Both strength-wise and troll-wise

2

u/mat2923 Oct 26 '26

I strongly recommend including this checkmate

https://youtube.com/shorts/KuCTJpuF2H0?si=pCdrY07On1j7kpKp

1

u/Mithrillic Oct 26 '26

hahahha I'll see what I can do

1

u/cappappac 23d ago

daisychess.org can do that and more

1

u/Mithrillic 23d ago

Can you elaborate?

3

u/Majestic-Tear1512 Oct 22 '26

Haha that looks fun.

2

u/Mountain-Fennel1189 Oct 23 '26

Wow, ive never heard of anything like this before haha

1

u/justtheprint Oct 23 '26

interesting idea. maybe you could generalize the bong cloud to opening lines which reach a sufficient disadvantage early that is only realized with precise opponent play. 

1

u/Equal-Yogurt-2797 Oct 23 '26

Is there a WASM version

1

u/Sweetcorncakes Oct 23 '26

This is how I Play

1

u/icantfish Oct 24 '26

How does one get access to this? It would be fun for kiddo who plays a lot.

1

u/FranklinFizzlybear 28d ago

Four horses of doom!

0

u/[deleted] Oct 24 '26

[removed] — view removed comment

1

u/icantfish Oct 24 '26

Fuck threadfox, all my friends hate threadfox too.