Release of DCTL: draughts and checkers template library
-
- Posts: 44
- Joined: Wed Nov 17, 2010 13:26
- Real name: Walter Thoen
Re: Release of DCTL: draughts and checkers template library
Hi Rein,
Thanks for the detailed explanation. It seems I might have encountered another Visual C++ specific problem.
2>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(554): error C2039: 'construct' : is not a member of 'dctl::short_alloc<U,0x010>'
2> with
2> [
2> U=std::_Container_proxy
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(550) : while compiling class template member function 'void std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>::_Alloc_proxy(void)'
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(528) : see reference to function template instantiation 'void std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>::_Alloc_proxy(void)' being compiled
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(657) : see reference to class template instantiation 'std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>' being compiled
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Users\Walter.Tho\Desktop\DCTL\dctl/search/variation.hpp(19) : see reference to class template instantiation 'std::vector<int,dctl::IntAlloc>' being compiled
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I will try to setup a Linux VM as well.
Regards,
Walter
Thanks for the detailed explanation. It seems I might have encountered another Visual C++ specific problem.
2>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(554): error C2039: 'construct' : is not a member of 'dctl::short_alloc<U,0x010>'
2> with
2> [
2> U=std::_Container_proxy
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(550) : while compiling class template member function 'void std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>::_Alloc_proxy(void)'
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(528) : see reference to function template instantiation 'void std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>::_Alloc_proxy(void)' being compiled
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(657) : see reference to class template instantiation 'std::_Vector_alloc<true,std::_Vec_base_types<_Ty,_Alloc>>' being compiled
2> with
2> [
2> _Ty=int
2> , _Alloc=dctl::IntAlloc
2> ]
2> C:\Users\Walter.Tho\Desktop\DCTL\dctl/search/variation.hpp(19) : see reference to class template instantiation 'std::vector<int,dctl::IntAlloc>' being compiled
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I will try to setup a Linux VM as well.
Regards,
Walter
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
Did you compile in Debug or Release mode? IIRC, VC++ runs in Debug mode by default. Unfortunately, this will add some code to the vector memory allocator that is not fully Standard compliant for custom allocators like I use (another C++11 feature that I rely on). E.g. the error about a missing member function construct() is bogus because this is supposed to be provided by std::allocator_traits
Under Release mode those errors should go away.
Under Release mode those errors should go away.
-
- Posts: 44
- Joined: Wed Nov 17, 2010 13:26
- Real name: Walter Thoen
Re: Release of DCTL: draughts and checkers template library
Hi Rein,
It is all working now. Thanks for your help.
Let me know if I can assist you with anything to develop this nice project further.
Regards,
Walter
It is all working now. Thanks for your help.
Let me know if I can assist you with anything to develop this nice project further.
Regards,
Walter
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
HI Walter,Walter Thoen wrote:Hi Rein,
It is all working now. Thanks for your help.
Let me know if I can assist you with anything to develop this nice project further.
Regards,
Walter
Good to hear you succeeded in building the project! I will update the installation instructions on BitBucket. We can discuss ideas by email INITIAL NODOTORSPACE LASTNAME AT GMAIL DOT COM. I am very interested in hearing what you would like to use the library for.
Rein
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
Hi everyone, I've greatly updated my DCTL page with a lot of new documentation on installing and building the library.
See https://bitbucket.org/rhalbersma/dctl/overview for an overview.
See https://bitbucket.org/rhalbersma/dctl/overview for an overview.
-
- Posts: 221
- Joined: Thu Nov 27, 2008 19:22
- Contact:
Re: Release of DCTL: draughts and checkers template library
Very nice project.
Is it correct that this project won't run on 32 bits?
Is it correct that this project won't run on 32 bits?
http://slagzet.com
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
Thanks for your interesting my library! Are you using it already or just browsing the source code?Maurits Meijer wrote:Very nice project.
Is it correct that this project won't run on 32 bits?
To answer your question: no, the project will run on 32-bits, but you might need to change the default bit twiddling functionality depending on which branch from the repository you use. The current default is to use 64-bit CPU-intrinsics for counting the number of 1-bits and to find the index of the first 1-bit. For 32-bits machines, these intrinsics are not available and you will get a compile error. Instead, I provide small lookup 256-sized tables to get index/count values for each byte. In a next release, I will enable a conditional compiler flag based on the detected architecture into the Makefile. For now, in dctl/src/bit/bit.hpp you can change the implementations of bit::index and bit::count to use lookup::index and lookup::count instead of intrinsic::index and intrinsic::count.
Note that the library is currently pre-alpha experimental, and the interface is subject to change!
Rein
-
- Posts: 221
- Joined: Thu Nov 27, 2008 19:22
- Contact:
Re: Release of DCTL: draughts and checkers template library
You're welcome, thank you for providing it.Rein Halbersma wrote: Thanks for your interesting my library! Are you using it already or just browsing the source code?
I was looking for some tooling to test and work on the slagzet.com engine when I remembered this project. So i decided to take a look. While the vs2012 install was failing I read trough this thread and got the suspicion it wouldn't work on 32 bit, so i gave up. But now I will definitely try again.
http://slagzet.com
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
I have made significant changes to the DCTL project, streamlining the build process and documenting the requirements. See the BitBucket repository for more information https://bitbucket.org/rhalbersma/dctl/overview
Re: Release of DCTL: draughts and checkers template library
Hi Rein,Rein Halbersma wrote:I have made significant changes to the DCTL project, streamlining the build process and documenting the requirements. See the BitBucket repository for more information https://bitbucket.org/rhalbersma/dctl/overview
I see regular commits on Bitbucket, but maybe you could update us a bit more on overall progress. What is your latest forecast for a working bare bones engine?
After all the end of the year is a good time to look both back and forward
Walter
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
Hi Walter,Walter wrote:Hi Rein,Rein Halbersma wrote:I have made significant changes to the DCTL project, streamlining the build process and documenting the requirements. See the BitBucket repository for more information https://bitbucket.org/rhalbersma/dctl/overview
I see regular commits on Bitbucket, but maybe you could update us a bit more on overall progress. What is your latest forecast for a working bare bones engine?
After all the end of the year is a good time to look both back and forward
Walter
Well, I have made a lot of progress, but perhaps not in the direction you are looking for the most
On the one hand, I have made the very time-consuming transition from raw 64-bit integer bitboards to a bit_set class template that allows arbitrary user-defined board sizes. This was very difficult and required changing almost all template-metaprogramming to the new C++14 constexpr features. Current compiler technology still limits it a little (at least until I have figured out a way to override some Clang template and constexpr limits), but DCTL now supports up to 26x26 boards with both numeric and algebraic notation, and possibly even larger boards with only numeric notation (untested). The upside is that all this refactoring also made the code a few thousand lines smaller, so less to maintain in the future.
With some help by Wieger, I have also made some progress towards an engine. If you follow the instructions on the BitBucket repository, you can try to install the requirements and build and run the test suite yourself. From the build directory, you can then run the program test/game/game_play which sets up an interactive shell that displays the initial position (currently for the 26x26 board, but it's easy to change the test source file <dctl/test/game/play.cpp> and setup a 10x10 board in numeric notation. Let me know if you need help! (Wieger succeeded in building and running the tests, so it does not work on just my machine ) This test program will be the stepping stone on top of which I want to build the engine.
On big issue I haven't resolved yet is which GUI to program against. For 8x8 checkers, I want to support Martin Fierz's CheckerBoard, and for 10x10 draughts the GUIDE protocol seems promising. I have also been dabbling with XBoard a little. Plus Aart's Android GUI is looking very nice. One thing to be done is to generate captures with all the intermediate step as additional data, in such a way as to avoid code duplication (I have an idea how to approach it, but it will take some time).
A final snag to resolve is how to get Clang to compile a Windows native target. There is a Visual C++ plugin but that is a) very experimental and b) requires the professional edition in order to be used. Hopefully, GCC 4.9 (scheduled for March/April '14) will support C++14 constexpr, so that I can use the MinGW version for Windows builds.
So... I think you should see more progress towards a playable engine in 2014 (no promises and fixed dates however).
Rein
Re: Release of DCTL: draughts and checkers template library
Rein,
Thanks for the update. It is still a very interesting project as it seems to combine extreme flexibility with extreme efficiency.
The feature to get all intermediate fields of a capture sequence is indeed very important for an attractive user interface. It is clearly a challenge to achieve this without duplicate code and without comprising the efficiency of the move generator. You might just have to pay the price of duplicate code
For my selfish purposes DXP support would be more important than GUI support as DXP is needed to evaluate and improve the engine strength first before it becomes interesting for a human to play against the engine. In general, I would be interested to know how to you intend to do evaluation given all the different board sizes and rules that DCTL supports.
If at some point in time you are interested to test with Visual Studio, then let me know. As part of our Microsoft Partner and MSDN subscriptions we are entitled to more licenses than we currently use.
Ps. This year's Joop Meure Rapid Tournament on 22 March will feature a special Killer-group. Anyone interested in experimenting with this new rule is more than welcome to participate.
Regards,
Walter
Thanks for the update. It is still a very interesting project as it seems to combine extreme flexibility with extreme efficiency.
The feature to get all intermediate fields of a capture sequence is indeed very important for an attractive user interface. It is clearly a challenge to achieve this without duplicate code and without comprising the efficiency of the move generator. You might just have to pay the price of duplicate code
For my selfish purposes DXP support would be more important than GUI support as DXP is needed to evaluate and improve the engine strength first before it becomes interesting for a human to play against the engine. In general, I would be interested to know how to you intend to do evaluation given all the different board sizes and rules that DCTL supports.
If at some point in time you are interested to test with Visual Studio, then let me know. As part of our Microsoft Partner and MSDN subscriptions we are entitled to more licenses than we currently use.
Ps. This year's Joop Meure Rapid Tournament on 22 March will feature a special Killer-group. Anyone interested in experimenting with this new rule is more than welcome to participate.
Regards,
Walter
Re: Release of DCTL: draughts and checkers template library
Walter, as I also use (an older version) Visual Studio (VS) I might be interested to work with a more recent VS version.
What are the conditions to use the newer release...
Bert
What are the conditions to use the newer release...
Bert
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Release of DCTL: draughts and checkers template library
The DXP support is something not very far off. For long term engine development, I am looking for integration with another framework: cute-chess-cli. I am told that it can support non-chess engine matches, and that means you get all kinds of statistical tools and parameter-tuning frameworks at your disposal.Walter wrote: For my selfish purposes DXP support would be more important than GUI support as DXP is needed to evaluate and improve the engine strength first before it becomes interesting for a human to play against the engine. In general, I would be interested to know how to you intend to do evaluation given all the different board sizes and rules that DCTL supports.
For the evaluation function, my first probably very naive strategy is to just write a bunch of general eval terms (material, center, balance, terrain, tempo, outposts) plus some lock and bridge patterns, and just automatically tune the coefficients and see where that leads to. But these would just be base level programs, I don't expect them to be competitive compared to the state of the art. That will require more manual labor
Thanks, that's very generous of you! I will keep that in mind.If at some point in time you are interested to test with Visual Studio, then let me know. As part of our Microsoft Partner and MSDN subscriptions we are entitled to more licenses than we currently use.
Re: Release of DCTL: draughts and checkers template library
I expect that with all your draughts knowledge and auto coefficient tuning your implementation could already approach top level!For the evaluation function, my first probably very naive strategy is to just write a bunch of general eval terms (material, center, balance, terrain, tempo, outposts) plus some lock and bridge patterns, and just automatically tune the coefficients and see where that leads to. But these would just be base level programs, I don't expect them to be competitive compared to the state of the art. That will require more manual labor
But I tend to agree that in the end the eval function is the area which makes the difference and (so far) requires a huge manual effort.
For this reason I'm still thinking how we could approach evaluation function learning in a different way.
That was also the reason that Im now working on DQL.
The base idea is to find specific board/game positions with a DQL-search, and than extract the relevant patterns from the DQL search output.
My main focus these days is the white outpost on 24 evaluation. The base algorithm (as used by most i guess), is to count attackers and defenders (with some clever race-conditions).
Unfortunately there are many exceptions, and exceptions on exceptions, and ...
I still did not find the breakthrough solution/approach , but if it was easy everybody would have done it already...
Bert