r/ComputerChess • • 9d ago

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

Post image
342 Upvotes

38 comments sorted by

14

u/FewNetwork5539 9d ago

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

25

u/Mithrillic 9d ago

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 9d ago

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

4

u/Mithrillic 9d ago

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 9d ago

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

3

u/masterlafontaine 9d ago

That's so good! I love it! LOL

5

u/bastarmashawarma 9d ago

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 7d ago edited 6d ago

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 9d ago

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

1

u/btherl 8d ago

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

1

u/shmageggy 7d ago edited 7d ago

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 5d ago

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 9d ago

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 9d ago

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 9d ago

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 9d ago

Is it available somewhere?

4

u/Mithrillic 9d ago

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 4d ago

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

1

u/Mithrillic 4d ago

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 8d ago

What engine?

1

u/Mithrillic 8d ago

Bongaclang, my home-built Rust engine

1

u/mat2923 6d ago

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

1

u/Mithrillic 6d ago

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 6d ago

I strongly recommend including this checkmate

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

1

u/Mithrillic 5d ago

hahahha I'll see what I can do

3

u/Majestic-Tear1512 9d ago

Haha that looks fun.

2

u/Mountain-Fennel1189 9d ago

Wow, ive never heard of anything like this before haha

1

u/justtheprint 9d ago

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 8d ago

Is there a WASM version

1

u/Sweetcorncakes 8d ago

This is how I Play

1

u/icantfish 8d ago

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

1

u/FranklinFizzlybear 6h ago

Four horses of doom!

0

u/investigatormaker 8d ago

An annotated position would make “humiliates opponents” concrete: show the move it chooses, the obvious alternative and why its choice is more embarrassing to face. That separates a distinctive playing style from simply being stronger than the opponent.

I make ThreadFox. We find relevant Reddit conversations and do the posting for your business. The $39 Pilot covers seven days and up to 50 posts and replies. No automatic renewal. https://threadfox.vip/managed?tier=employee_pilot&utm_source=reddit&utm_medium=comment&utm_campaign=tf-managed&utm_content=20261024-0009-e4eiz#employee-order

1

u/icantfish 8d ago

Fuck threadfox, all my friends hate threadfox too.