Luciole (UCI engine written in Lua)

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
Roland Chastain
Posts: 106
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Luciole (UCI engine written in Lua)

Post by Roland Chastain » Mon May 13, 2019 9:56 pm

Hello!

I would like to present a little engine I have made. It's a Lua script. I called it Luciole.

For now it has a very simple "best move" function, based on material balance after two hafmoves. To give you an idea of its level, here is the result of a quick tournament.

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws
   1 Alouette 0.0.5                382     nan      10   90.0%   20.0%
   2 NEG 0.3                         0     144      10   50.0%   60.0%
   3 NEG 1.2                       -35     201      10   45.0%   30.0%
   4 Luciole 0.0.1                 -35     163      10   45.0%   50.0%
   5 Ram 2.0                       -70      92      10   40.0%   80.0%
   6 Iota 0.3                     -147     135      10   30.0%   60.0%
Finished match
To run Luciole, you need a Lua interpreter. The command is "lua luciole.lua".

Here is the source code repository and a package with Windows binaries.

When the UCI interface is finished, it could be used to transform into UCI engines some of the existing Lua chess programs.

User avatar
Roland Chastain
Posts: 106
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Luciole (UCI engine written in Lua)

Post by Roland Chastain » Sat May 18, 2019 6:36 pm

Hello! Version 0.0.2 is available. Luciole is now compatible with Linux and can play chess 960.

Luciole is still a very weak opponent but it seems to work correctly.

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws
   0 Luciole 0.0.2                -338     nan      12   12.5%    8.3%
   1 Pulsar 2009 9a                inf     nan       4  100.0%    0.0%
   2 ArcBishop80 1.0               inf     nan       4  100.0%    0.0%
   3 Alouette 0.0.5                 89     nan       4   62.5%   25.0%
Finished match
Now I think I will add a perft function.

mar
Posts: 1937
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Luciole (UCI engine written in Lua)

Post by mar » Sat May 18, 2019 8:01 pm

Very nice.

Luciole seems to play fixed depth + moves seem a bit random to me though (maybe I'm doing something wrong)

I've noticed you use math.mininteger/math.maxinteger from Lua 5.3, if you replace this with constants, Luciole can be run in LuaJIT http://luajit.org/luajit.html
which is an awesome JIT compiler compatible with Lua 5.1 - depending on what your Lua code does, the speedup can be up to 2 orders of magnitude
over the default interpreter

This could be interesting once Luciole gets more mature (once you implement search and time control), because it'd mean free elo for you
Martin Sedlak

User avatar
Roland Chastain
Posts: 106
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Luciole (UCI engine written in Lua)

Post by Roland Chastain » Sat May 18, 2019 9:06 pm

mar wrote:
Sat May 18, 2019 8:01 pm
Very nice.

Luciole seems to play fixed depth + moves seem a bit random to me though (maybe I'm doing something wrong)
Thank you. No, you are not doing something wrong. There is just a material evaluation on two halfmoves, otherwise the program plays the first move generated.
mar wrote:
Sat May 18, 2019 8:01 pm
I've noticed you use math.mininteger/math.maxinteger from Lua 5.3, if you replace this with constants, Luciole can be run in LuaJIT http://luajit.org/luajit.html
which is an awesome JIT compiler compatible with Lua 5.1 - depending on what your Lua code does, the speedup can be up to 2 orders of magnitude
over the default interpreter

This could be interesting once Luciole gets more mature (once you implement search and time control), because it'd mean free elo for you
Thank you for the idea. I will give a look to LuaJIT.

Post Reply