chess engine in LISP

Discussion of chess software programming and technical issues.

Moderator: Ras

tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

chess engine in LISP

Post by tcusr »

hello together, i want to write a chess engine while learning LISP and i wanted to know your opinions. i know pretty much nothing about LISP but i know it's not statically typed so bitboards are not an options but maybe i shouldn't even think about using classical methods in LISP.

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

PS.
other languages are totally possible, i was also considering learning haskell because it's fast and a functional language but i know nothing about FP :(
User avatar
Look
Posts: 382
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: chess engine in LISP

Post by Look »

I remembered Symbolic by Steven Edwards. He was trying to code a chess engine with different AI techniques.
Farewell.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

Look wrote: Mon Jan 03, 2022 3:51 pm I remembered Symbolic by Steven Edwards. He was trying to code a chess engine with different AI techniques.
yes i heard about it, unfortunately it's closed source.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: chess engine in LISP

Post by Sven »

tcusr wrote: Mon Jan 03, 2022 1:09 pm hello together, i want to write a chess engine while learning LISP and i wanted to know your opinions. i know pretty much nothing about LISP but i know it's not statically typed so bitboards are not an options but maybe i shouldn't even think about using classical methods in LISP.
I really don't know very much about LISP, too, but I thought that Common LISP has data types like (signed-byte 64) or (unsigned-byte 64) and bitwise operations like logand, logior, logxor that may be suitable for bitboards. Did you check that?
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

Sven wrote: Mon Jan 03, 2022 9:14 pm
tcusr wrote: Mon Jan 03, 2022 1:09 pm hello together, i want to write a chess engine while learning LISP and i wanted to know your opinions. i know pretty much nothing about LISP but i know it's not statically typed so bitboards are not an options but maybe i shouldn't even think about using classical methods in LISP.
I really don't know very much about LISP, too, but I thought that Common LISP has data types like (signed-byte 64) or (unsigned-byte 64) and bitwise operations like logand, logior, logxor that may be suitable for bitboards. Did you check that?
good to know, choosing a dialect was also difficult because i don't really understand their differences.
i'll look into that, thanks
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: chess engine in LISP

Post by Henk »

LISP is too slow. All functional languages are too slow. They have only theoretic value. If you don't care about speed Prolog or XSLT is an interesting alternative. Just declarative programming. Otherwise take a functional language.

Might be that later on you regret the slow speed. So better take C++ or C# if you do care.

By the way C# has lambda expressions too.
tcusr
Posts: 325
Joined: Tue Aug 31, 2021 10:32 pm
Full name: tcusr

Re: chess engine in LISP

Post by tcusr »

Henk wrote: Mon Jan 03, 2022 10:47 pm LISP is too slow. All functional languages are too slow. They have only theoretic value. If you don't care about speed Prolog or XSLT is an interesting alternative. Just declarative programming. Otherwise take a functional language.

Might be that later on you regret the slow speed. So better take C++ or C# if you do care.

By the way C# has lambda expressions too.
i was also worried about speed but then i found this OS in Common LISP.
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: chess engine in LISP

Post by Henk »

tcusr wrote: Mon Jan 03, 2022 10:54 pm
Henk wrote: Mon Jan 03, 2022 10:47 pm LISP is too slow. All functional languages are too slow. They have only theoretic value. If you don't care about speed Prolog or XSLT is an interesting alternative. Just declarative programming. Otherwise take a functional language.

Might be that later on you regret the slow speed. So better take C++ or C# if you do care.

By the way C# has lambda expressions too.
i was also worried about speed but then i found this OS in Common LISP.
I just don't believe Common Lisp would be as fast as C languages. Common Lisp almost a functional language. So comparable speed as one of the optimized functional languages. But still too slow. By the way I programmed two years in a Lisp dialect. Was fun. They had a compiler so Lisp being compiled into C. But still too slow. But you miss strong type checking. So you get more annoying run time errors. They used AVL trees to implement association and property lists.
User avatar
Look
Posts: 382
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: chess engine in LISP

Post by Look »

You may code it in C++ or C too. IMHO alpha-beta considers chess as a whole. The concept called "constraint satisfaction" introduced in AI specially Prolog might be a viable replacement for alpha-beta.
Farewell.
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. »

Zig, Nim, Odin, Pony