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);
        }
Example #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));
        }
 public Solution ComputeWinningRegionZero(ReachabilityGame game)
 {
     return game.GetArena().ZeroAttractor(game.GetReachSet());
 }
Example #4
0
 public Solution ComputeWinningRegionZero(ReachabilityGame game)
 {
     return(game.GetArena().ZeroAttractor(game.GetReachSet()));
 }