Board list for ml

im trying to develop a ml solution that tell my algo whaether atacking is a good or a bad idea. for this i would basicly just need smoe kind of 2 dimensonal aray with the unit type as number and mayby a 0 as no unit just would be interested if something like this already existed in the gamestate or geamelib somewhere or if i will just hve to use some for loops