Stockfish / Glaurung abstract base classes

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

Moderators: hgm, Rebel, chrisw

Norbert Raimund Leisner
Posts: 1643
Joined: Tue May 20, 2008 4:57 pm
Location: Augsburg - Germany

Stockfish / Glaurung abstract base classes

Post by Norbert Raimund Leisner »

Hello,

SF supports Syzygy Bases of course, but what are in your opinion
"abstract base classes? cf. https://github.com/spinkham/stockfish/b ... /endgame.h

A kind of internal bitbases for SF or does this feature only belong to accomplish several endgame constellations?

Best wishes,
Norbbert
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: Stockfish / Glaurung abstract base classes

Post by abulmo2 »

"Abstract base class" is C++, or more generally any object oriented language, jargon. Nothing to do with endgame data-bases or bit-bases, or whatever base chess engines have. Here it just defines a common interface to the various endgame functions.
Richard Delorme
modolief
Posts: 44
Joined: Tue Apr 30, 2013 6:29 pm

Re: Stockfish / Glaurung abstract base classes

Post by modolief »

If you're curious, this "abstract base class" is a concept from the realm of object oriented programming. For instance, you might have a program part of which deals with bicycles. In particular, say you have some mountain bikes and some road bikes. Some things are different between those. Perhaps only mountain bikes will ever have a suspension, and perhaps only road bikes will have pedals that can attach to shoes. Both mountain bikes and road bikes will share commonalities that are described in a Bicycle class, and in your program you only ever create instances of the MountainBike or the RoadBike class; in fact the compiler may be given directives such that it's not even allowed to create instances of the Bicycle class. In this example then, Bicycle is the abstract base class.