official-pikafish / Pikafish

UCI xiangqi engine
http://pikafish.com
GNU General Public License v3.0
940 stars 172 forks source link

使用vs2019编译后运行出错,应该是nnue的 #31

Closed happyh closed 1 year ago

happyh commented 1 year ago

Describe the issue

evaluate_nnue.cpp里面的: // Read network parameters bool read_parameters(std::istream& stream) {

std::uint32_t hashValue;
if (!read_header(stream, &hashValue, &netDescription)) return false;
if (hashValue != HashValue) return false;
if (!Detail::read_parameters(stream, *featureTransformer)) return false;
for (std::size_t i = 0; i < LayerStacks; ++i)
  if (!Detail::read_parameters(stream, *(network[i]))) return false;

调试发现这里 network 的 header != T::get_hash_value() 不一样导致的。

return stream && stream.peek() == std::ios::traits_type::eof();

}

这个header的值是与计算的T::get_hash_value() 不一样导致的。

请问这个是因为使用的nnue与代码不一致导致的吗?使用的nnue是release里面的nnue。

谢谢了。

Expected behavior

程序运行错误,提示: info string ERROR: Network evaluation parameters compatible with the engine must be available. info string ERROR: The network file pikafish.nnue was not loaded successfully. info string ERROR: The UCI option EvalFile might need to specify the full path, including the directory name, to the network file. info string ERROR: The engine will be terminated now.

Steps to reproduce

启动程序,输入bench

Anything else?

No response

Operating system

Windows

Pikafish version

pikafish-2022-12-26

PikaCat-OuO commented 1 year ago

如果你使用的是pikafish-2022-12-26里面的nnue,那你应该用12月26号对应的代码:https://github.com/official-pikafish/Pikafish/tree/88afc2d301387cc67ebe21a0b1e66df6543190df

happyh commented 1 year ago

如果你使用的是pikafish-2022-12-26里面的nnue,那你应该用12月26号对应的代码:https://github.com/official-pikafish/Pikafish/tree/88afc2d301387cc67ebe21a0b1e66df6543190df

谢谢了,我是checkout Pikafish-2022-12-26 这个tag的代码。

happyh commented 1 year ago

如果你使用的是pikafish-2022-12-26里面的nnue,那你应该用12月26号对应的代码:https://github.com/official-pikafish/Pikafish/tree/88afc2d301387cc67ebe21a0b1e66df6543190df

谢谢了 ,我用群里的 2022-12-26 版本的 nnue不对,但是用git下下来的 nnue就对了。

请问一下这个nnue是怎么生成呀,程序运行导出的吗? 谢谢了。

PikaCat-OuO commented 1 year ago

如果你使用的是pikafish-2022-12-26里面的nnue,那你应该用12月26号对应的代码:https://github.com/official-pikafish/Pikafish/tree/88afc2d301387cc67ebe21a0b1e66df6543190df

谢谢了 ,我用群里的 2022-12-26 版本的 nnue不对,但是用git下下来的 nnue就对了。

请问一下这个nnue是怎么生成呀,程序运行导出的吗? 谢谢了。

程序自对弈生成训练数据后通过pytorch训练生成的,目前训练器不打算开源。

happyh commented 1 year ago

好的,感谢,谢谢了。