critter-mj / akochan

Artificial Intelligence for Japanese mahjong

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows 10 64bit Compilation

illion20 opened this issue · comments

I have installed every single mingw32 version for x86_64 from 6 to 11 to compile both boost 1_70 and 1_78 but to no prevail.
I always end up with an ai.dll that is not compatible with Windows.

ss

Process:

  1. Download boost 1_70
  2. Install mingw32 x86_64 for posix (tried win32 as well) v6.4.0 - v11
  3. Bootstrap boost, b2 build all using mingw32 gcc
  4. Add path to Makefile and change the lib name accordingly
  5. Make ai_src and get a broken ai.dll

Is there some secret sauce I am missing?

Appreciate any hints.

*** UPDATE ***
I have tracked down the code line that has an issue:
const int MAX_EDGE_NUM_PER_THREAD = 100000 * 64;

if I change this to:
const int MAX_EDGE_NUM_PER_THREAD = 100000 * 60;

then it works but fail to see why... must be a boost thing initializing static_vector with a too large number

std::array<boost::container::static_vector<Tehai_Action, MAX_EDGE_NUM_PER_THREAD>, CAL_NUM_THREAD> cand_graph_sub_tsumo_work;
std::array<boost::container::static_vector<Tehai_Action, MAX_EDGE_NUM_PER_THREAD>, CAL_NUM_THREAD> cand_graph_sub_fuuro_work;

Maybe one reason is that RAM memory capacity is too small.
I think larger than 8GB is desirable.
Also building with WSL(windows subsystem for linux) may help, because it is easier than build with windows.

I have 32 GB RAM and my PC is relatively high-end so I doubt its the resources. Its a weird threshold too, as in if I change it to 61 instead of 60 it results in an error. Very bewildering to be honest.

@critter-mj
Just wanted to ask if you have optimized the ako params since the initial commit 3 years ago?