예제 #1
0
        // ----------------------------------------------------------------------------------------
        #region BaseObject

        protected override void CopyFrom(object o)
        {
            base.CopyFrom(o);
            WorldSettings value = o as WorldSettings ?? throw new InvalidTypeException(o, nameof(WorldSettings), 801331);

            BiasMagnitude       = value.BiasMagnitude;
            WeightMagnitude     = value.WeightMagnitude;
            MaxIter             = value.MaxIter;
            Epsilon             = value.Epsilon;
            Tolerance           = value.Tolerance;
            CostFunction        = value.CostFunction;
            TrainingSampleCount = value.TrainingSampleCount;
            LearningRate        = value.LearningRate;
            MomentumCoefficient = value.MomentumCoefficient;
            Lambda          = value.Lambda;
            TestSampleCount = value.TestSampleCount;
        }
예제 #2
0
파일: World.cs 프로젝트: widovd/NEUNET
        public void Run(WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource)
        {
            Stopwatch timer = new Stopwatch();

            timer.Start();
            long ticks = timer.Elapsed.Ticks;

            while (true)
            {
                tokenSource?.Token.ThrowIfCancellationRequested();
                long prevTicks = ticks;
                ticks = timer.Elapsed.Ticks;
                float dt = (float)(ticks - prevTicks) / TimeSpan.TicksPerSecond;
                Step(dt, settings, reporter, tokenSource);
                UpdateTransforms();
            }
        }
예제 #3
0
파일: World.cs 프로젝트: widovd/NEUNET
 public override void Step(float dt, WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource)
 {
     base.Step(dt, settings, reporter, tokenSource);
 }
예제 #4
0
파일: Moveable.cs 프로젝트: widovd/NEUNET
 public virtual void Step(float dt, WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource)
 {
     Visual.Step(dt, settings, reporter, tokenSource);
 }