コード例 #1
0
            public void Execute(int index)
            {
                // Read data from input
                var stateKey  = UnexpandedStates[index];
                var stateData = StateDataContext.GetStateData(stateKey);

                // Make modifications to copy of state
                var newStateData = StateDataContext.CopyStateData(stateData);

                newStateData += ValueToAdd;
                var newStateKey = StateDataContext.RegisterState(newStateData);

                var reward = ValueToAdd;

                // Register action. Output transition info (state, action, result, resulting state key).
                CreatedStateInfo.Enqueue(new StateTransitionInfoPair <int, int, StateTransitionInfo>(stateKey, ValueToAdd, newStateKey, new StateTransitionInfo {
                    Probability = 1f, TransitionUtilityValue = reward
                }));
            }