antaz / blaze

Just another chess engine written in C
MIT License
3 stars 0 forks source link

improve eval by strategy and pawn structures ? #1

Open tissatussa opened 1 year ago

tissatussa commented 1 year ago

hi,

i successfully compiled your v0.1 into a Linux binary and it runs fine in CuteChess ! btw. your previous Trappist asset binary did NOT run, i couldn't use it ..

Blaze plays rather weak (still) .. i played a game with the White pieces, using a typical pawn structure setup in the opening and Blaze seemed confused by it, and (even) blundered a piece :

RB-vs-Blaze-v1 0


RB-vs-Blaze-v0 1-analyse

the analyses is on LiChess : their quick SF 14 eval.

here's my own explanation, HTH. maybe you can tune eval parameters to make Blaze understand strategical ideas and square relations ?

[Event "human vs engine"]
[Site "Holland @ https://lichess.org/DqYa6kbM "]
[Date "2023.02.19"]
[Round "?"]
[White "Roelof Berkepeis"]
[Black "Blaze v0.1"]
[Result "*"]
[ECO "A06"]
[Opening "Reti"]
[Termination "adjudication"]
[Variation "Nimzovich-Larsen attack"]

1.Nf3 d5
2.b3 ...

with this opening White claims square e5, an important black centre square,
maybe Black should aim for f7-f6 to claim e5 himself,
but other setups are possible also.

2...Nf6
3.Bb2 e6
4.e3 Nc6?

Black should aim for the normal c7-c5, now the Knight disrupts this pawn push.

5.c4 Bb4?

this is not check, on b4 the Bishop is an easy target for White to improve his position : 

6.a3 Bd6
7.d4 b6
8.Qc2 dxc4
9.Bxc4 O-O
10.e4 Na5??

a blunder .. now White wins a piece with a simple fork combination : 

11.e5 Nxc4
12.bxc4 Be7
13.exf6 Bxf6

*
antaz commented 1 year ago

Hi @tissatussa and thanks for the feedback. very appreciated. Indeed it is rather weak and there's a lot of room for improvement in the evaluation function, I am actively working on this, but first i want to switch to using bitboards instead of 10x12 board representation

tissatussa commented 1 year ago

i see you implemented bitboards into the dev-version .. at which moment your master will be updated ? Are you still testing / implementing the bitboards ?

antaz commented 1 year ago

@tissatussa It's really unclear actually, i'm trying to do it patiently but i guess it's just hard. i'm trying to add unit tests but i'm mainly just testing locally for now. but hopefully when we have a working bitboard implementation we will start updating master

tissatussa commented 1 year ago

any progress with your bitboard implementation ?

antaz commented 1 year ago

I did manage to have a working quad-bitboards implementation after experimenting with different bitboards, but i won't be able to push these changes yet as i have to do more testing and sort things out.

antaz commented 1 week ago

Hi @tissatussa,

I wanted to let you know that i've been pushing a lot of changes to the new refactor of Blaze in the dev branch. At this point it's almost (i need a bit more testing) catching up to main, but with significantly speedier backend implementation. I'm also focusing mainly on functionality for now, but i want to make the code also idiomatic and readable later on.

tissatussa commented 1 week ago

@antaz Nice ! How do you test ? Using Test Suites ? Perform many self-play games ? Can i test also / help you ?

antaz commented 1 week ago

@tissatussa That would be awesome! I use fastchess and ordo. I will let you know when i push the jupyter notebook i use for testing with all the commands needed

antaz commented 1 week ago

https://gist.github.com/antaz/5d8e0599c0a5331485f8c748b836fe70

You can use this notebook for now to automate testing of different versions, or feel free to adjust or setup your own testing environment.