Example #1
0
        public Evaluator3(WorldAccessor worldAccessor, TrainingRoom room, BotTrackingStorage log, ExperimentInitArgs_Activation activation, HyperNEAT_Args hyperneatArgs = null, double maxEvalTime = 15, double?initialRandomVelocity = null)
        {
            _worldAccessor         = worldAccessor;
            _room                  = room;
            _log                   = log;
            _activation            = activation;
            _hyperneatArgs         = hyperneatArgs;
            _maxEvalTime           = maxEvalTime;
            _initialRandomVelocity = initialRandomVelocity;

            // Set distances based on room size (or take as params?, or just a percent param?)
            double roomWidth = Math1D.Min
                               (
                room.AABB.Item2.X - room.AABB.Item1.X,
                room.AABB.Item2.Y - room.AABB.Item1.Y,
                room.AABB.Item2.Z - room.AABB.Item1.Z
                               );

            // Want radius, not diameter
            _roomRadius = roomWidth / 2;

            _maxDistance2 = _roomRadius * MULT_MAXDIST2;
            _maxDistance  = _roomRadius * MULT_MAXDIST;
            _minDistance  = _roomRadius * MULT_MINDIST;
        }
Example #2
0
        public Evaluator_WeaponSpin(WorldAccessor worldAccessor, TrainingRoom room, BotTrackingStorage log, ExperimentInitArgs_Activation activation, double weaponSpeed_Min, double weaponSpeed_Max, HyperNEAT_Args hyperneatArgs = null, double maxEvalTime = 15)
        {
            _worldAccessor = worldAccessor;
            _room          = room;
            _log           = log;
            _activation    = activation;
            _hyperneatArgs = hyperneatArgs;
            _maxEvalTime   = maxEvalTime;

            // Set distances based on room size (or take as params?, or just a percent param?)
            double roomWidth = Math1D.Min
                               (
                room.AABB.Item2.X - room.AABB.Item1.X,
                room.AABB.Item2.Y - room.AABB.Item1.Y,
                room.AABB.Item2.Z - room.AABB.Item1.Z
                               );

            // Want radius, not diameter
            _roomRadius = roomWidth / 2;

            _maxDistance2 = _roomRadius * MULT_MAXDIST2;
            _maxDistance  = _roomRadius * MULT_MAXDIST;

            // Weapon Speed
            _weaponSpeed_Min  = weaponSpeed_Min;
            _weaponSpeed_Max  = weaponSpeed_Max;
            _weaponSpeed_Max2 = _weaponSpeed_Max + ((_weaponSpeed_Max - _weaponSpeed_Min) / 2);
        }
Example #3
0
 public Evaluator2(WorldAccessor worldAccessor, TrainingRoom room)
 {
     _worldAccessor = worldAccessor;
     _room          = room;
 }