user23428: I am a newbie. I want to code a chinese chess engine, and I want to modify Stockfish source code to do so. But the Stockfish source code is too hard to understand. There are no document to explain everything. I don't know where to start. For example, today I try to understand the bitbase.cpp file. This line of code in this file is not well documented:
constexpr unsigned MAX_INDEX = 2*24*64*64; // stm * psq * wksq * bksq = 196608

I really don't know where to ask questions about these kind of things. It's open source but it seem to be understanded by only few people. Please give me suggestions to understand the source code better. Thanks!

user825: I believe the line you quote is about probing KPK tablebase endgame. There are 64 squares for the king, and 24 squares for the pawns (mirrored from file A to D). Nothing special, just how Stockfish indexes the bitbase data structure.
The code is not going to work in Chinese Chess for obvious reason.

This line of code in this file is not well documented

No, the line was fully documented. Please look at the code file again.

Please give me suggestions to understand the source code better

In the open source world, if you don't have sufficient coding experience you just can't do anything. You may ask on the Fishcooking forum, but you will still need decent programming experience.

23428: <p>I am a newbie. I want to code a chinese chess engine, and I want to modify Stockfish source code to do so. But the Stockfish source code is too hard to understand. There are no document to explain everything. I don't know where to start. For example, today I try to understand the bitbase.cpp file. This line of code in this file is not well documented:</p>

<pre><code>constexpr unsigned MAX_INDEX = 2*24*64*64; // stm * psq * wksq * bksq = 196608
</code></pre>

<p>I really don't know where to ask questions about these kind of things. It's open source but it seem to be understanded by only few people. Please give me suggestions to understand the source code better. Thanks!</p>
 825: <p>I believe the line you quote is about probing KPK tablebase endgame. There are 64 squares for the king, and 24 squares for the pawns (mirrored from file A to D). Nothing special, just how Stockfish indexes the bitbase data structure.</p>

<p>The code is not going to work in Chinese Chess for obvious reason.</p>

<blockquote>
  <p>This line of code in this file is not well documented</p>
</blockquote>

<p>No, the line was fully documented. Please look at the code file again.</p>

<blockquote>
  <p>Please give me suggestions to understand the source code better</p>
</blockquote>

<p>In the open source world, if you don't have sufficient coding experience you just can't do anything. You may ask on the Fishcooking forum, but you will still need decent programming experience.</p>
