crippa1337 / Pytteliten

Chess engine under 4kB
MIT License
15 stars 7 forks source link

v0.1 is dev ? #26

Closed tissatussa closed 1 year ago

tissatussa commented 1 year ago

i really like the idea of creating an engine under 4 Kb .. i followed recent TCEC contests of this kind .. it's a challenge for programmers to fit chess logic into max amount of bytes.

your rather new engine Svart seems pretty strong, about 2900, so you know about the many techniques involved .. but when testing Pytteliten v0.1 in CuteChess, it starts the game with 1.a4 and 2.c4 .. i guess you must have noticed that also .. what's your concept to improve the strength and stay within 4 Kb ? Will Pytteliten be based on Svart in some way ?

i will keep following your updates !

crippa1337 commented 1 year ago

Hey Tissa, thank for your interest in Pytteliten.

It lacks a great deal of strength due to it being incredible simple at the moment in comparison to other engines. We (the contributors) are working hard and have plenty of ideas on how to improve it's strength.

Svart and Pytteliten are unrelated and written in different languages. A majority of Pytteliten is written by contributors who have never worked on Svart.

crippa1337 commented 1 year ago

To add onto your questions, yes, the current version of Pytteliten is a development version and not a release. We use a python script to mangle and minify the source code and a bash script to compress it. We keep track of how many bytes a change adds to evaluate whether the strength gain is worth it or not.

tissatussa commented 1 year ago

yes, i see it's C++ code .. that seems to be a most efficient way of programming a chess engine, in many aspects .. exchanging ideas between programmers is wonderful, a project like this gives many challenges, i also follow the developments of the 4KU engine, now v3, and its performance at TCEC .. this tournament is TOP !

crippa1337 commented 1 year ago

4ku has been a major inspiration for Pytteliten, indeed a great engine. We hope to be invited to the TCEC 4K tournament when Pytteliten becomes stronger 😁

tissatussa commented 1 year ago

sure you will be invited, this TCEC setup is new and i saw not many candidates .. did you ever see the JS engine 'P4wn' play ? It's under 5K and still at https://github.com/douglasbagnall/p4wn and https://p4wn.sourceforge.net .. it's very fast and plays rather strong .. i wonder how strong when its code is converted to C++ and its deepening is tuned .. it must have some nifty HCE rules .. try it !

tissatussa commented 1 year ago

human -vs- v0.1 : https://lichess.org/op48p7tL

pytteliten-v0 1--vs--RB

pytteliten-v0 1--vs--RB--SF15-graph

tissatussa commented 1 year ago

it was a nice game .. again Black played the a-pawn at the first move .. but maybe here because i did 1.b3 which more or less invites ...a5

tissatussa commented 1 year ago

i think pawn structure is most important when creating an engine .. v0.1 plays its pawn like a mad man, but it manages (against a human) to keep its piece harmony while its King is bare and thus in constant danger : pawns can not go back .. myself, i play that Nakamura Larsen setup, with b3 and an early e3, a well planned c4! and d4! and such constellation unfolds in my mind, knowing the concepts and finding the right moves ate the right time .. could an engine be made which solely plays eg. that setup ? For that to succeed, the programmer should be a good chess player also, i guess .. what about a little pawn NN ?

i will play another game.

crippa1337 commented 1 year ago

Any good chess engine isn't developed with a style in mind except to increase elo, it might be possible sure, but I won't be spending any time soon on developing a stylized engine at least

tissatussa commented 1 year ago

FYI an update : i just compiled the source (at Smaller Move Parsing, PR 34) and played a game in CuteChess, 15 min. This time Pytteliten started with 1.h4 !? In this modern era that can't be a bad move : go Harry !!

i easily managed to get a winning attack but my adventure unfortunately had a surprising ending with .. that h-pawn !

https://lichess.org/LpMFPtXB/

Pytteliten-vs-RB_LpMFPtXB

nice ending of this Issue, isn't it ? Pytteliten is improving ! :-)

[ no need to post more game animations, unless you insist ]

crippa1337 commented 1 year ago

Glad you find enjoyment in our engine :) The H-pawn is a peculiar play but understandable when the engine doesn't see any winning move and just does a "random" one :P, it will get better soon when we introduce Piece-Square Tables.

tissatussa commented 1 year ago

[1.h4 is..] understandable when the engine doesn't see any winning move and just does a "random" one :P

well, letting the engine play a Rapid game (8 minutes) in CuteChess shows that it's thinking 14 seconds before deciding 1.h4, which happens in other games too .. however, the info pane also shows no other move was ever considered on this first move, so it's not random !? I guess your HCE decides best move ?

it will get better soon when we introduce Piece-Square Tables

nice .. i like the PST concept, used by many programmers, especially when both MG and EG types are used. i have some more questions and info about this, but i guess it's better to start a new Issue for that, so i just did.