コード例 #1
0
ファイル: Program.cs プロジェクト: danzel/PatchworkSim
        internal (SimulationState state, int gameId) CreateSimulation(int?randomSeed, int mctsIterations)
        {
            lock (this)
            {
                var id = ++_nextSim;

                var state = new SimulationState(SimulationHelpers.GetRandomPieces(randomSeed), 0);
                state.Fidelity = SimulationFidelity.NoPiecePlacing;
                var opp = new MoveOnlyMonteCarloTreeSearchMoveMaker(mctsIterations);

                _simulations[id] = state;
                _opponents[id]   = opp;

                return(state, id);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: danzel/PatchworkSim
 public Program(IPatchworkServerClient client)
 {
     _client = client;
     _ai     = new MoveOnlyMonteCarloTreeSearchAlphaZeroMoveMaker(_client, 100);
     _opp    = new MoveOnlyMonteCarloTreeSearchMoveMaker(20);
 }