Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="_logt">intervals between section logs</param>
        /// <param name="_topt">termination option</param>
        /// <param name="_mcnt">termination options: [max iterations, max evaluations], [termination error]</param>
        /// <param name="_terr"></param>
        public Algorithm(int _logt, Foundation.TerminationOption _topt, int _mcnt, double?_terr)
        {
            // termination options...

            // byfault: _opt=[maxfevs]
            // byfnevs: _opt=[maxfevs]
            // byitrns: _opt=[maxitrs]
            // byerror: _opt=[maxitrs,error]

            this._logt = _logt;

            this._topt = _topt;
            this._mcnt = _mcnt;

            if ((_topt == Foundation.TerminationOption.ByTerminationError) && (_terr == null))
            {
                throw new Exception();
            }

            this._terr = _terr;
        }
Beispiel #2
0
        partial void test_search_tictactoeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // 0. create environment
            AI.Search.Adversarial.Environment envr = new AI.Search.Adversarial.Environment();

            // 1. create game
            int _logt = 1; // log interval

            Foundation.TerminationOption _topt = Foundation.TerminationOption.ByIterations;
            int    _maxitrs = 0;
            double?_terr    = null; // termination error

            // create game
            AI.Search.Adversarial.Games.TicTacToe.Game game = new AI.Search.Adversarial.Games.TicTacToe.Game(_logt, _topt, _maxitrs, _terr);

            // 2. set game environment
            game.Environment = envr;

            // 3. run game
            game.Run();

            // 4. print game logs
            richTextBox.Text = game.Output;
        }
Beispiel #3
0
 public Iterative(int _logt, Foundation.TerminationOption _topt, int _mcnt, double?_terr)
     : base(_logt, _topt, _mcnt, _terr)
 {
 }
Beispiel #4
0
 public Algorithm(int _logt, Foundation.TerminationOption _topt, int _mcnt, double?_terr)
     : base(_logt, _topt, _mcnt, _terr)
 {
 }