示例#1
0
        public void Run(Options options)
        {
            var coliseum = new Coliseum();

            coliseum.OnStatusChanged += ShowResult;
            coliseum.OnError         += OnError;
            coliseum.Run(options);
        }
示例#2
0
        public void Run(Options options)
        {
            string logFolderPath = Path.Combine(LogFolderName, Util.GetDateString());

            options.ToModel().Save(Path.Combine(logFolderPath, "setting.xml"));

            var coliseum = new Coliseum();

            coliseum.ShowStatus       += ShowStatus;
            coliseum.ShowErrorMessage += ShowErrorMessage;
            coliseum.Run(options, logFolderPath);
        }
        private void OnStart()
        {
            // 測定開始前に設定を保存しておく
            model.Save(SettingFileName);

            var options = new Options
            {
                Engine1FilePath       = Engine1FilePath.Value,
                Engine2FilePath       = Engine2FilePath.Value,
                Eval1FolderPath       = Eval1FolderPath.Value,
                Eval2FolderPath       = Eval2FolderPath.Value,
                NumConcurrentGames    = NumConcurrentGames.Value,
                NumGames              = NumGames.Value,
                HashMb                = HashMb.Value,
                NumBookMoves1         = NumBookMoves1.Value,
                NumBookMoves2         = NumBookMoves2.Value,
                BookFileName1         = BookFileName1.Value,
                BookFileName2         = BookFileName2.Value,
                NumBookMoves          = NumBookMoves.Value,
                SfenFilePath          = SfenFilePath.Value,
                Nodes1                = Nodes1.Value,
                Nodes2                = Nodes2.Value,
                NodesRandomPercent1   = NodesRandomPercent1.Value,
                NodesRandomPercent2   = NodesRandomPercent2.Value,
                NodesRandomEveryMove1 = NodesRandomEveryMove1.Value,
                NodesRandomEveryMove2 = NodesRandomEveryMove2.Value,
                Time1                  = Time1.Value,
                Time2                  = Time2.Value,
                Byoyomi1               = Byoyomi1.Value,
                Byoyomi2               = Byoyomi2.Value,
                Inc1                   = Inc1.Value,
                Inc2                   = Inc2.Value,
                Rtime1                 = Rtime1.Value,
                Rtime2                 = Rtime2.Value,
                NumNumaNodes           = NumNumaNodes.Value,
                ProgressIntervalMs     = ProgressIntervalMs.Value,
                NumThreads1            = NumThreads1.Value,
                NumThreads2            = NumThreads2.Value,
                BookEvalDiff1          = BookEvalDiff1.Value,
                BookEvalDiff2          = BookEvalDiff2.Value,
                ConsiderBookMoveCount1 = ConsiderBookMoveCount1.Value,
                ConsiderBookMoveCount2 = ConsiderBookMoveCount2.Value,
                IgnoreBookPly1         = IgnoreBookPly1.Value,
                IgnoreBookPly2         = IgnoreBookPly2.Value,
                Gui = true,
            };

            ProgressBarValue.Value   = 0;
            ProgressBarMinimum.Value = 0;
            ProgressBarMaximum.Value = NumGames.Value;

            var coliseum = new Coliseum();

            coliseum.ShowStatus       += ShowStatus;
            coliseum.ShowErrorMessage += ShowErrorMessage;

            // logフォルダを作成する。
            string logFolderPath = Path.Combine(LogFolderName, Util.GetDateString());

            Directory.CreateDirectory(logFolderPath);

            // ログフォルダに設定ファイルを保存する。
            model.Save(Path.Combine(logFolderPath, "setting.xml"));

            Task.Run(() =>
            {
                StartMenuItemEnabled.Value = false;
                coliseum.Run(options, logFolderPath);
                StartMenuItemEnabled.Value = true;
            });
        }