Esempio n. 1
0
 public Output()
 {
     agi = null;
     stoneReverse = null;
     stoneRotate = null;
     stoneX = null;
     stoneY = null;
 }
Esempio n. 2
0
 public Output(AdvanceGameInfo agi)
 {
     this.agi = agi;
     int listSize = agi.GetAgiStoneList().GetListSize();
     stoneReverse = new string[listSize];
     stoneRotate = new string[listSize];
     stoneX = new int[listSize];
     stoneY = new int[listSize];
     for(int i=0; i < listSize; i++)
     {
         stoneReverse[i] = "";
         stoneRotate[i] = "";
         stoneX[i] = 0;
         stoneY[i] = 0;
     }
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            String initFile = "app_config.txt";
            if(args.Length != 0)
            {
                initFile = args[0];
            }

            COMMON_MAP commonMap = new COMMON_MAP(initFile);

            Console.WriteLine("SEARCH_FOR=>" + commonMap.PROBLEM_FILE);

            GameInfo gi = new GameInfo();
            gi.GetProblem(commonMap);

            AdvanceGameInfo agi = new AdvanceGameInfo(gi);

            Search sch = new Search(agi, commonMap);
            int score = sch.SearchStart();

             Console.WriteLine("file:{0} score:{1}", commonMap.FILENAME, score.ToString());
        }
Esempio n. 4
0
 public Search(AdvanceGameInfo agi, COMMON_MAP map)
 {
     this.agi = agi;
     this.commonMap = map;
     rand = new Xorshift();
     storeDataDic = new Dictionary<int, StoreData>();
     searchQueId = new ConcurrentQueue<int>();
     nextQueId = new ConcurrentQueue<int>();
     answerId = new Dictionary<int, StoreData>();
     saveStoreDataDic = new Dictionary<int, StoreData>();
     problemEmptySize = agi.GetAgiFields().GetEmptySize();  /* 問題のEMPTYサイズ */
     depthSize = 0;
     searchTimes = 0;
     AnnealingRate = new int[11] { ANNEALING_RATE_0,
         ANNEALING_RATE_10,
         ANNEALING_RATE_20,
         ANNEALING_RATE_30,
         ANNEALING_RATE_40,
         ANNEALING_RATE_50,
         ANNEALING_RATE_60,
         ANNEALING_RATE_70,
         ANNEALING_RATE_80,
         ANNEALING_RATE_90,
         ANNEALING_RATE_100 };
     setConstData(map);
     this.fileName = map.FILENAME;
     smallOrderList = new int[agi.GetAgiStoneList().GetListSize()];
     RetrySearch = new Queue<List<StoreData>>();
 }
Esempio n. 5
0
 public Search()
 {
     agi = null;
     commonMap = null;
     smallOrderList = null;
     rand = new Xorshift();
     storeDataDic = new Dictionary<int, StoreData>();
     searchQueId = new ConcurrentQueue<int>();
     nextQueId = new ConcurrentQueue<int>();
     answerId = new Dictionary<int, StoreData>();
     saveStoreDataDic = new Dictionary<int, StoreData>();
     problemEmptySize = 0;
     depthSize = 0;
     searchTimes = 0;
     AnnealingRate = new int[11] { ANNEALING_RATE_0,
         ANNEALING_RATE_10,
         ANNEALING_RATE_20,
         ANNEALING_RATE_30,
         ANNEALING_RATE_40,
         ANNEALING_RATE_50,
         ANNEALING_RATE_60,
         ANNEALING_RATE_70,
         ANNEALING_RATE_80,
         ANNEALING_RATE_90,
         ANNEALING_RATE_100 };
     setConstDataDefault();
     fileName = "default.txt";
     RetrySearch = new Queue<List<StoreData>>();
 }