Beispiel #1
0
    public CreatureStats GetCreatureStatsOfCurrentBest(BestCreaturesOverlayView view)
    {
        var generation = bestCreatureController.CurrentGeneration;
        var info       = evolution.SimulationData.BestCreatures[generation - 1];

        return(info.Stats);
    }
Beispiel #2
0
    public int GetNumberOfNetworkOutputs(BestCreaturesOverlayView view)
    {
        var currentBest = bestCreatureController.CurrentBest;

        if (currentBest == null)
        {
            return(0);
        }
        return(currentBest.brain.NumberOfOutputs);
    }
Beispiel #3
0
    public void SelectedGeneration(BestCreaturesOverlayView view, int generation)
    {
        generation = Math.Max(1, generation);
        // Check if the selected generation has been simulated yet.
        var lastSimulatedGeneration = evolution.SimulationData.BestCreatures.Count;

        if (lastSimulatedGeneration < generation)
        {
            view.ShowErrorMessage(string.Format("Generation {0} has not been simulated yet.\n\nCurrently Simulated up to Generation {1}", generation, lastSimulatedGeneration));
            return;
        }

        view.HideErrorMessage();
        bestCreatureController.ShowBestCreature(generation);
        Refresh();
    }
Beispiel #4
0
 public int GetNumberOfNetworkInputs(BestCreaturesOverlayView view)
 {
     return(evolution.GetNumberOfCurrentBrainInputs());
 }
Beispiel #5
0
 public NeuralNetworkSettings GetNetworkSettingsOfCurrentBest(BestCreaturesOverlayView view)
 {
     return(evolution.NetworkSettings);
 }
Beispiel #6
0
 public int GetGenerationOfCurrentBest(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.CurrentGeneration);
 }
Beispiel #7
0
 public int GetCurrentSimulationGeneration(BestCreaturesOverlayView view)
 {
     return(evolution.CurrentGenerationNumber);
 }
Beispiel #8
0
 public int GetAutoplayDuration(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.AutoplayDuration);
 }
Beispiel #9
0
 public bool IsAutoplayEnabled(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.AutoplayEnabled);
 }
Beispiel #10
0
 public void DidClickOnPipView(BestCreaturesOverlayView view)
 {
     visibleScreen = VisibleScreen.Simulation;
     Refresh();
 }
Beispiel #11
0
 public void DidChangeAutoplayDuration(BestCreaturesOverlayView view, int duration)
 {
     bestCreatureController.AutoplayDuration = duration;
 }
Beispiel #12
0
 public void DidChangeAutoplayEnabled(BestCreaturesOverlayView view, bool enabled)
 {
     bestCreatureController.AutoplayEnabled = enabled;
 }