Downloadable 8-piece db and open source driver

Discussion about development of draughts in the time of computer and Internet.
Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Downloadable 8-piece db and open source driver

Post by Ed Gilbert » Sat Nov 12, 2016 14:09

Bert, thanks for letting me know. Good to hear that it worked well for you.

-- Ed

Yves
Posts: 41
Joined: Sat Feb 20, 2016 14:00

Re: Downloadable 8-piece db and open source driver

Post by Yves » Fri Nov 18, 2016 17:10

BertTuyt wrote:Ed, I included the EGDB driver (as-is) with a small wrapper (as my Board configuration is slightly different) in my test program Dwarf.
Also downloaded the 8P DB.
It all worked perfectly.
As one could expect, I tested the Woldouby position, and when the zero score popped up around ply 30, it really felt like a miracle (although we all know these days that it is a draw).

So again thanks for sharing.

Bert


Hi Bert
When will it be possible to test Dwarf with its database
Against Horizon, Scan, Dragon, Kingsrow, Flits, Truus, Tornado, Mobydam
Thank you for your reply.
Yves

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: Downloadable 8-piece db and open source driver

Post by BertTuyt » Sat Nov 19, 2016 22:02

I have limited time for Computer Draughts these days, so I also have no timing for Dwarf.

Bert

CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: Downloadable 8-piece db and open source driver

Post by CheckersGuy » Sat Dec 31, 2016 00:18

Hey,
I am programming a checkers engine in java and I am currently working on my search algorithm. Is there anyway I can use the database access could using java ? I guess JNI (Java-Native-Interface) would be a workaround but I dont know how much overhead that would add to the probing code. It would be worth a try but before doing so I would like to know what you guys think.


Thanks :)

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Downloadable 8-piece db and open source driver

Post by Ed Gilbert » Sat Dec 31, 2016 13:02

I am programming a checkers engine in java and I am currently working on my search algorithm. Is there anyway I can use the database access could using java ? I guess JNI (Java-Native-Interface) would be a workaround but I dont know how much overhead that would add to the probing code. It would be worth a try but before doing so I would like to know what you guys think.
I don't know anything about JNI, but each call into the egdb driver does a non-trivial amount of work, so I would expect that the overhead of bridging the two environments is negligible in comparison.

-- Ed

CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: Downloadable 8-piece db and open source driver

Post by CheckersGuy » Thu Jan 05, 2017 08:20

I havent worked much with JNI but I did some tests and there is negliable performance loss as you had already pointed out.
I got one more question. Is there any other way to download the KingsRow 10-piece endgame database (preferably by a direct link) ? I want to download all the databases I need to my Linux-Server but I cant make it work with "mega"

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Downloadable 8-piece db and open source driver

Post by Ed Gilbert » Fri Jan 06, 2017 14:08

Is there any other way to download the KingsRow 10-piece endgame database (preferably by a direct link) ? I want to download all the databases I need to my Linux-Server but I cant make it work with "mega"
Because of the sizes of the files, Mega says the downloads only work with Chrome or Opera. I have only tested it with Chrome. Download on a Windows machine or in a Windows VM if it doesn't work with your linux browser.

-- Ed

jj
Posts: 190
Joined: Sun Sep 13, 2009 23:33
Real name: Jan-Jaap van Horssen
Location: Zeist, Netherlands

Re: Downloadable 8-piece db and open source driver

Post by jj » Tue Mar 14, 2017 14:56

Ed Gilbert wrote:
I am programming a checkers engine in java and I am currently working on my search algorithm. Is there anyway I can use the database access could using java ? I guess JNI (Java-Native-Interface) would be a workaround but I dont know how much overhead that would add to the probing code. It would be worth a try but before doing so I would like to know what you guys think.
I don't know anything about JNI, but each call into the egdb driver does a non-trivial amount of work, so I would expect that the overhead of bridging the two environments is negligible in comparison.

-- Ed
For Java users: I made a Java Native Interface (JNI) to the drivers. A zip file containing the binary (DLL) and Java sources can be downloaded via the link on https://github.com/eygilbert/egdb_intl or directly via http://edgilbert.org/InternationalDraug ... dbJava.zip.

First I tried with Java Native Access (JNA). This is easy but has a HUGE overhead. Then I switched to JNI, which is a bit awkward but fast.

Performance test, 1 million lookups:
- C++ 180 msec
- Java/JNA+DLL 2805 msec
- Java/JNI+DLL 183 msec

Jan-Jaap
www.maximusdraughts.org

CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: Downloadable 8-piece db and open source driver

Post by CheckersGuy » Fri Apr 14, 2017 01:48

Hey,
is this wrapper only for international draughts (10x10) or also for Checkers (8x8) ?


Greetings

Robin

jj
Posts: 190
Joined: Sun Sep 13, 2009 23:33
Real name: Jan-Jaap van Horssen
Location: Zeist, Netherlands

Re: Downloadable 8-piece db and open source driver

Post by jj » Mon Apr 17, 2017 11:41

CheckersGuy wrote:Hey,
is this wrapper only for international draughts (10x10) or also for Checkers (8x8) ?

Greetings

Robin
I'm not familiar with the 8x8 checkers drivers, but a quick look learns that they are slightly different from the 10x10 draughts drivers.
However, you can use the same approach to create your own JNI interface to the 8x8 checkers database.

Jan-Jaap
www.maximusdraughts.org

CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: Downloadable 8-piece db and open source driver

Post by CheckersGuy » Sat Apr 29, 2017 18:34

Hey,
I am still very unfamiliar with C,C++. I am currently trying to compile the example.cpp ED provided to test whether the Chinook databases are found
Which compiler settings should I use ?

I am currently using

Code: Select all

g++ -Wno-write-strings egdb_example.cpp -L/. egdb64.dll -o hallo.exe
but that produces the error

Code: Select all

egdb.h:131:10: error: invalid use of 'extern' in linkage specification
 EGDB_API extern unsigned int egdb_version;
I used mingw64 to compile the program

I would appreciate any help

Ed Gilbert
Posts: 859
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: Downloadable 8-piece db and open source driver

Post by Ed Gilbert » Sat Apr 29, 2017 20:48

but that produces the error
Code:
egdb.h:131:10: error: invalid use of 'extern' in linkage specification
EGDB_API extern unsigned int egdb_version;


I used mingw64 to compile the program
I have only compiled it with Visual Studio 2015. I don't know why mingw64 is complaining about that line, but if that is the only problem, you can try commenting that line out. It is only needed if your own program references the global named egdb_version. The example program does not use it.

-- Ed

CheckersGuy
Posts: 20
Joined: Mon Oct 17, 2016 09:05
Real name: Robin Messemer

Re: Downloadable 8-piece db and open source driver

Post by CheckersGuy » Sat Apr 29, 2017 21:09

Ed Gilbert wrote:
but that produces the error
Code:
egdb.h:131:10: error: invalid use of 'extern' in linkage specification
EGDB_API extern unsigned int egdb_version;


I used mingw64 to compile the program
I have only compiled it with Visual Studio 2015. I don't know why mingw64 is complaining about that line, but if that is the only problem, you can try commenting that line out. It is only needed if your own program references the global named egdb_version. The example program does not use it.

-- Ed
I could compile the program now. Pretty weird that mingw complained about that particular line but at least I got it to work now. Hopefullyl, I wont get any errors when implementing the code in my own engine.

Thanks for helping me out

Post Reply