Re:Deep Cloning Objects in JavaScript, the Modern Way
by dtx1 on Thursday December 21, 2023 @09:18PM
(#38730135)
That is really useful, thank you! I think first stage is building the game and see if the whole Genetic Algorithm/Monte Carlo Setup actually works, even if the first few iterations take weeks.
The issue is I want to figure out if there are combos that I don't even know exist that are unusually strong. Basically make sure I balance the card pool but automatically.
For inspiration, many chess engines store game state in a "bitboard" [0] which is a 64 bit representation of some (partial) state of the board.
Of course, at this point you might not even want to be using JavaScript... maybe you could write the hot path in Rust, compile it to wasm, and then use JS for orchestration/UI.
[0] https://en.wikipedia.org/wiki/Bitboard#Chess_bitboards