What do you think of policy based design for a chess engine or library? The techniques put forth in Modern C++ Design and after seem very powerful. But is a chess engine too small or specific to benefit significantly from PBD?
One benefit I see as desirable is easily modifiable code that is also ...
Search found 8 matches
- Thu Aug 07, 2014 3:51 am
- Forum: Programming and Technical Discussions
- Topic: Policy based design in chess
- Replies: 2
- Views: 1635
- Sun Aug 03, 2014 6:35 am
- Forum: General Topics
- Topic: Best Resources for Improving
- Replies: 4
- Views: 3890
Re: Best Resources for Improving
The fastest way to improve is to hire a coach. Some say coaches are expensive. I say spending 5 years studying the wrong thing and making only small improvements is at best an unfortunate use of your valuable time. A coach will identify your weaknesses and consistently help you correct them. A coach ...
- Thu Apr 24, 2014 9:42 pm
- Forum: Programming and Technical Discussions
- Topic: Programming chess engine
- Replies: 40
- Views: 27011
Re: Programming chess engine
I have written chess engines both in C and in C++. For this task C++ is neither necessary nor useful. I think C++ shines in GUI toolkits like Qt for example. Sure the same can be done in C, but it's more laborious. In the end the most important and only useful thing in C++ are constructor ...
- Fri Apr 04, 2014 5:56 pm
- Forum: Programming and Technical Discussions
- Topic: Senpai code question
- Replies: 4
- Views: 2678
Re: Senpai code question
Is constexpr any better, or still awkward?
#include <iostream>
#include <array>
struct List {
enum Inst {
GEN_EVASION,
GEN_TRANS,
GEN_TACTICAL,
GEN_KILLER,
GEN_CHECK,
GEN_PAWN,
GEN_QUIET,
GEN_BAD,
GEN_END,
POST_MOVE,
POST_MOVE_SEE,
POST_KILLER,
POST_KILLER_SEE,
POST_BAD ...
#include <iostream>
#include <array>
struct List {
enum Inst {
GEN_EVASION,
GEN_TRANS,
GEN_TACTICAL,
GEN_KILLER,
GEN_CHECK,
GEN_PAWN,
GEN_QUIET,
GEN_BAD,
GEN_END,
POST_MOVE,
POST_MOVE_SEE,
POST_KILLER,
POST_KILLER_SEE,
POST_BAD ...
- Fri Apr 04, 2014 6:06 am
- Forum: Programming and Technical Discussions
- Topic: Senpai code question
- Replies: 4
- Views: 2678
Senpai code question
What is meant here?
Code: Select all
namespace gen_sort {
// HACK: outside of List class because of C++ "static const" limitations :(
- Fri Apr 04, 2014 2:52 am
- Forum: Programming and Technical Discussions
- Topic: Seeking chess engine to modify
- Replies: 6
- Views: 3738
Re: Seeking chess engine to modify
I have written a number of chess engines over the years. Tell me, is it better to write code that reads like English, or code that is well separated and structured (into components/modules, a la Large Scale C++ Software Design)? I've tried both, and readable doesn't seem to jive with scalable. I'm ...
- Thu Apr 03, 2014 5:36 pm
- Forum: Programming and Technical Discussions
- Topic: Seeking chess engine to modify
- Replies: 6
- Views: 3738
Re: Seeking chess engine to modify
Thanks, I will plow through these as I have time. Do any open source engines stick out as being more usable as a chess library, or any that you consider particularly well written or otherwise beautiful regardless of playing ability?
- Thu Apr 03, 2014 2:50 am
- Forum: Programming and Technical Discussions
- Topic: Seeking chess engine to modify
- Replies: 6
- Views: 3738
Seeking chess engine to modify
I am seeking a chess engine to modify. I want to use it for a chess training program, for the end user to perform drills. It might be playing out a K+P vs K ending, or finding candidate moves with the best mobility or squares controlled (teaching the player about space), and so on. Preferably ...