State ChokudaiSearch(State FirstState) { Heap[] HStates = new Heap[MaxTurn + 1]; for (int i = 0; i <= MaxTurn; i++) HStates[i] = new Heap(); HStates[0].push(FirstState); int ChokudaiWidth = 1; //通称chokudai幅 while (TimeCheck()) { for (int t = 0; t < MaxTurn; t++) { for (int i = 0; i < ChokudaiWidth; i++) { if (HStates[t].top == null) break; var NowState = HStates[t].pop(); foreach (var NextState in NowState.GetAllNextState()) { HStates[t].push(NextState); } } } } var BestState = HStates[0].pop(); return BestState; }