コード例 #1
0
        public Solution ComputeWinningRegionOne(ReachabilityGame game)
        {
            ISet<int> winningRegionZero = ComputeWinningRegionZero(game).getWinningRegion();
            ISet<int> winningRegionOne = game.GetArena().GetNodes();
            winningRegionOne.ExceptWith(winningRegionZero);
            PositionalStrategy tau = new PositionalStrategy();
            foreach (var p1Node in winningRegionOne.Where(node => game.GetArena().IsPlayerOneNode(node)))
            {
                var nextNodeEnumerator = game.GetArena().GetSuccessors(p1Node).Where(node => !winningRegionZero.Contains(node)).AsEnumerable().GetEnumerator();
                nextNodeEnumerator.MoveNext();
                tau.Update(p1Node, nextNodeEnumerator.Current);
            }

            return new Solution(winningRegionOne, tau);
        }
コード例 #2
0
        public Solution ComputeWinningRegionOne(ReachabilityGame game)
        {
            ISet <int> winningRegionZero = ComputeWinningRegionZero(game).getWinningRegion();
            ISet <int> winningRegionOne  = game.GetArena().GetNodes();

            winningRegionOne.ExceptWith(winningRegionZero);
            PositionalStrategy tau = new PositionalStrategy();

            foreach (var p1Node in winningRegionOne.Where(node => game.GetArena().IsPlayerOneNode(node)))
            {
                var nextNodeEnumerator = game.GetArena().GetSuccessors(p1Node).Where(node => !winningRegionZero.Contains(node)).AsEnumerable().GetEnumerator();
                nextNodeEnumerator.MoveNext();
                tau.Update(p1Node, nextNodeEnumerator.Current);
            }

            return(new Solution(winningRegionOne, tau));
        }
コード例 #3
0
 public Solution ComputeWinningRegionZero(ReachabilityGame game)
 {
     return game.GetArena().ZeroAttractor(game.GetReachSet());
 }
コード例 #4
0
 public Solution ComputeWinningRegionZero(ReachabilityGame game)
 {
     return(game.GetArena().ZeroAttractor(game.GetReachSet()));
 }