- Home /
Board game minimax AI implementation
I am creating an turn-based board game and at this stage I implementing the AI that will be based on the MiniMax algorithm. My idea is to represent the board states in a SciptableObject where the nodes in this tree-like structure will be other scriptable objects of the same type. The question is the following: if I serialize the initial/current board state and write it to a json file, then deserialize it so that the AI can make its calculations, will I get a copy of the board or an object referencing the board. What I would like is a copy so that I don't mess up my current game state when the AI plays out its possible moves.
Sorry if the question is too broad and I know that the best answer is "why don't you try it out", but still - any guidance will be greatly appreciated.
Your answer
Follow this Question
Related Questions
[Solved]How to serialize Dictionary with Unity Serialization System 6 Answers
Difference between assigning a value in inspector and with a custom editor script 1 Answer
ScriptableObject asset loses reference after restarting Unity 1 Answer
Serializing ScriptableObject into scene without writing to asset 1 Answer
How to make a deep copy of a list of ScriptableObject derived types? 1 Answer