How can I train myself in pawn endgames?

How can I train myself in pawn endgames?

I'm looking for a chess program which offers to play pawn endgames to improve myself.
For example, can I force Fritz 13 to play pawns endgames? If so, how can I achieve this?

Solutions/Answers:

Answer 1:

Any chess-playing computer program that allows you to set up positions can be used. And yes, Fritz is especially suited for this.

You have several options:

  1. Set up the position yourself (using board/position set up). Choose any position that you want to get better at. Save that position and play against the computer.

    1a. I used to do this for simple pawn endings. I’d play both colors until I figured out some aspects of the pawn ending.

    1b. I’d often set up one side with an advantage (say an extra pawn) and see if I could win easily. (Since the computer plays well, this is not easy to do in practice.)

  2. You can start collecting some endgame positions, from a book or from around the web, create a small endgame learning database for yourself, and practice.

  3. In this video (be sure to watch) Nigel Davies recommends Silman’s Complete Endgame Course (I find most things by Silman to be very good.)

  4. Finally, if you don’t mind spending a little, “Fritz Endgame Trainers” (DVD or software add-ons) that ChessBase sells are quite good. (Just buy one at a time, and be sure to read the reviews to see if it is at the right level for your needs.)

Hope that helps.

References

Find magic numbers for bitboards

Find magic numbers for bitboards

I am writing a C++ chess engine and I am looking for magic numbers for Little-Endian Rank-File Mapping bitboards to generate moves for sliding pieces.
The rival chess website gives magic numbers but not for the same board mapping.
The chess programming wiki gives some of the best magic numbers so far but is not exhaustive.
At the end I am looking for four things:

occupancy mask for each square
magic number for each square
magic shifts for each square
moves database array for each square

So I can use the following code to find the moves of the Rook on C3 (for instance):
bbBlockers = bbAllPieces & occupancyMaskRook[C3]

databaseIndex = (int)((bbBlockers * magicNumberRook[C3]) >> rookMagicShifts[C3])

bbMoveSquares = magicMovesRook[C3][databaseIndex] & ~bbFriendlyPieces

Solutions/Answers:

Answer 1:

This is a very well known problem in chess programming. You should consider use the numbers generated by Pradyumna Kannan. Dr Kannan had kindly produced open-source the magic numbers. It is being used by Crafty and a few other chess engines including my own.

You can read more by google “Crafty magic number”.

I’ve prepared a zipped file for you here. This is the same files being used in the SmallChess chess engine app. Please read the documentation. Basically, you’ll need to call Rmagic(square, occupancy) for rooks and Bmagic(square, occupancy) for bishops. You can XOR those into a queen mask.

References