danzel / PatchworkSim

Simulation of the board game Patchwork for AI exploration
2 stars 0 forks source link

TightPlacement cache and recalculate #30

Closed danzel closed 6 years ago

danzel commented 6 years ago

If we could cache previous tightplacement result, we could just recalculate it for the rows and columns that we touched when we placed a piece.

danzel commented 6 years ago

Had another idea: Maybe we only need to calculate the score for the row/col that are affected by the piece, and not the rest of the board? We could calculate it before and after placing the piece... maybe?

danzel commented 6 years ago

Changed code to just calculate for the rows/columns that change, and cached it per batch of checks.