chess engine in LISP

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: chess engine in LISP

Post by mvanthoor »

tcusr wrote: Mon Jan 03, 2022 1:09 pm i want to change language because whenever i'm (re)writing an engine in C/++ i feel like i'm repeating a pattern and it's getting boring, a new language can bring another point of view and _maybe_ give me new ideas.
thanks
If you want a language that is fast but off-kilter, you could try Pascal (FreePascal compiler) or Ada (from AdaCore). Before 1.0, Rust was also off the beaten path, but now it's a more common language. Same with Go 10 years ago.There are now many chess engines in both. (And they're not really different compared to chess engines in C.)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
op12no2
Posts: 547
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: chess engine in LISP

Post by op12no2 »

j.t. wrote: Mon Jan 17, 2022 1:50 am Zig, Nim, Odin, Pony
Dart
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: chess engine in LISP

Post by Henk »

Or create a new programming language. Implementing LISP in C is least difficult. Or maybe better implement lambda calculus.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

thanks for all the suggestions but i think the problem is somewhere else.
i'm blaming the language for something it's my fault, my way of thinking, i can't get out of the cycle of implementing the same things all over again.
i can see this pattern in all the engines i read, they all implement the same things in slightly different ways but i don't blame them, nowadays writing a chess engine is like following a recipe.
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: chess engine in LISP

Post by mvanthoor »

tcusr wrote: Mon Jan 17, 2022 9:00 pm thanks for all the suggestions but i think the problem is somewhere else.
i'm blaming the language for something it's my fault, my way of thinking, i can't get out of the cycle of implementing the same things all over again.
i can see this pattern in all the engines i read, they all implement the same things in slightly different ways but i don't blame them, nowadays writing a chess engine is like following a recipe.
If you want to do new things, you'll have to go back to the 70's or 80's somehow... or get into AI, or choose one of the really off-beat things. Try an engine that creates evaluations and search parameter setups by evolution (genetic algorithms); if you have lots of computer power to spare that is.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
j.t.
Posts: 263
Joined: Wed Jun 16, 2021 2:08 am
Location: Berlin
Full name: Jost Triller

Re: chess engine in LISP

Post by j.t. »

tcusr wrote: Mon Jan 17, 2022 9:00 pm i can see this pattern in all the engines i read, they all implement the same things in slightly different ways but i don't blame them, nowadays writing a chess engine is like following a recipe.
I noticed the same thing. At some point, I stopped looking at code from other engines for inspiration and looking for new search/eval techniques. Of course, I still remember a lot of the stuff I read earlier, and I also see many ideas here in the forums, but I feel like I got more original, because if at all, I only have a very rough idea for inspiration.

In any case, I think that writing, or even "just" rewriting an engine in a new language is a great way learning this language quite well.
User avatar
emadsen
Posts: 440
Joined: Thu Apr 26, 2012 1:51 am
Location: Oak Park, IL, USA
Full name: Erik Madsen

Re: chess engine in LISP

Post by emadsen »

tcusr wrote: Mon Jan 17, 2022 9:00 pm i can see this pattern in all the engines i read…
Why are you reading other engines? Just write it yourself without any a priori knowledge of other people’s code.

I view that as a key difference between a hobby programming project and a professional programming project. In a professional programming project, you’re obligated (by tight schedules, marketplace pressures, etc) to leverage prior implementations- either build (mimicking prior techniques) or buy commercial or reference open source libraries so you’re starting at a forward point.

In a hobby programming project, you’re not. You can experience the early days by making your own attempt to implement algorithms from ideas alone. For the pure intellectual satisfaction of it. Because there’s no management to answer to.

Of course, if you’re competing for Elo, you can’t ignore other code. So it depends on your goals.

I find your goal of writing a chess engine in an eclectic language admirable. I’m just pointing out if you’re frustrated seeing so many others wearing out the same rut in the chess programming road, choosing a less popular language doesn’t automatically solve that. It’s more a question of attitude and intent regardless of the language you choose.
Erik Madsen | My C# chess engine: https://www.madchess.net
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

i want to make clear that i never copied code from other people, i wrote my old engine (and also this new rewrite) from scratch, what i look for in other engines is how they organize the code because i don't want to end up with a mess. for example i look for what i might need and then implement it from the start but this method doesn't work because i get overwhelmed quickly (here shows my lack of experience in writing software) .
i also read them to "confirm" that what i'm doing is correct, what if i make a mistake where the only solution is starting over again?
anyway i will listen to you and start implementing things on my own, thanks very much
op12no2
Posts: 547
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: chess engine in LISP

Post by op12no2 »

tcusr wrote: Mon Jan 17, 2022 9:00 pm thanks for all the suggestions but i think the problem is somewhere else.
i'm blaming the language for something it's my fault, my way of thinking, i can't get out of the cycle of implementing the same things all over again.
i can see this pattern in all the engines i read, they all implement the same things in slightly different ways but i don't blame them, nowadays writing a chess engine is like following a recipe.
How about trying MCTS + NN?
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

op12no2 wrote: Tue Jan 18, 2022 10:24 am
tcusr wrote: Mon Jan 17, 2022 9:00 pm thanks for all the suggestions but i think the problem is somewhere else.
i'm blaming the language for something it's my fault, my way of thinking, i can't get out of the cycle of implementing the same things all over again.
i can see this pattern in all the engines i read, they all implement the same things in slightly different ways but i don't blame them, nowadays writing a chess engine is like following a recipe.
How about trying MCTS + NN?
that's pretty advanced for me now. i still haven't started university, i think an AI field is probably the best option to explore new technologies.
i don't want to dive in complex things without a solid understanding of the fundamentals.
i think in this field python is more useful than LISP though (which was the AI language of the past), because it's more important to stay high level and let the libraries do the hard work.
either way i will still continue to develop my engine (C++) and try implement the general ideas on my own because experience is the best teacher, how many times i thought something was trivial to do until i had to actually do it...