谢谢二位版主的回复!
为什么菜鸟我想发这贴子?因为不懂。。。。。。
以下是国际象棋引擎作者自己介绍他写的引擎情况:
# Ethereal
Ethereal is a UCI-compliant chess engine. It uses the traditional alpha-beta framework in addition to a variety of pruning, reduction, extension, and other improvements. Some of those improvements include Static Null Move Pruning, Null Move Pruning, Node Razoring, Depth base Futility Pruning, Best-Case Delta Pruning, Current-Move Delta Pruning, Late Move Reductions, Check extensions, and the use of various Transposition Tables. Ethereal generates moves using the Fancy Magic BitBoard technique, but also uses a redundant 64-length array to store pieces for easier lookup. Ethereal is an original engine aside from the Piece Square Tables (currently using Toga II's tables). It is greatly influenced from Crafty, Stockfish, TSCP, MadChess, and Fruit. Ethereal is a hobby project, but more importantly it is an active resume.
# Elo Progression ( Ethereal7.33 and onward )
| Version | Elo |
| ------: | ---: |
| v7.33 | 2154|
| v7.40 | 2172|
| v7.42 | 2189|
| v7.49 | 2196|
| v7.55 | 2210|
| v7.57 | 2247|
| v7.58 | 2275|
| v7.60 | 2453|
| v7.61 | 2482|
| v7.65* | 2503|
| v7.69 | 2532|
| v7.70 | 2549|
# Development
As of now, I am the sole contributor to the project. However, I will happily review any Pull Requests and consider merging them into the project. The License on this project allows any individual to use, modify, and release my code and any derivatives made using my code. For any questions or comments, feel free to contact me at <Andrew@Grantnet.us>
作者编写的引擎用新的位棋盘技术很值得学习。我想将其引用到中国象棋引擎中。。。。。。
以下是作者引擎中一段代码
#include <stdint.h>
#include <assert.h>
#include "bitboards.h"
#include "bitutils.h"
int LsbLookupTable[64] = {
0, 47, 1, 56, 48, 27, 2, 60,
57, 49, 41, 37, 28, 16, 3, 61,
54, 58, 35, 52, 50, 42, 21, 44,
38, 32, 29, 23, 17, 11, 4, 62,
46, 55, 26, 59, 40, 36, 15, 53,
34, 51, 20, 43, 31, 22, 10, 45,
25, 39, 14, 33, 19, 30, 9, 24,
13, 18, 8, 12, 7, 6, 5, 63
};
/**
* Count the number of set bits in a given 64-bit Integer
*
* @param bb BitBoard to count set bits in
* @return Count of all set bits in bb
*计算设置位的数量在一个给定的64位整数
*
* @param bb位棋盘数套位
* @return计数设置位的bb
*/
int countSetBits(uint64_t bb){
int count = 0;
while(bb){
bb ^= (1ull << getLSB(bb));
count += 1;
}
return count;
}
/**
* Fill an array with the bit indexes of all set bits
* in a given 64-bit Integer. Set the array index after
* the last bit index location to -1 to indicate that
* all bit indexes have been traversed
*
* @param bb BitBoard to get set bits in
* @param arr Integer Array to fill with bit indexes
填充数组索引的所有部分
*在给定的64位整数。设置后的数组索引
*最后一点索引位置1,表示
*已经遍历所有点索引
*
* @param bb位棋盘中位
* @param arr整数数组填充索引
unsigned long 如何uint64_t
*/
void getSetBits(uint64_t bb, int * arr){
int count = 0;
while(bb){
int lsb = getLSB(bb);//#define getLSB(bb) (LsbLookupTable[(((bb) ^ ((bb)-1)) * 0x03f79d71b4cb0a89ull) >> 58])
arr[count] = lsb;//
count += 1;
bb ^= 1ull << lsb;
}
arr[count] = -1;
}
再次感谢二位版主的回复!