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

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

        if (currentBest == null)
        {
            return(0);
        }
        return(currentBest.brain.NumberOfOutputs);
    }
Exemple #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();
    }
Exemple #4
0
 public int GetNumberOfNetworkInputs(BestCreaturesOverlayView view)
 {
     return(evolution.GetNumberOfCurrentBrainInputs());
 }
Exemple #5
0
 public NeuralNetworkSettings GetNetworkSettingsOfCurrentBest(BestCreaturesOverlayView view)
 {
     return(evolution.NetworkSettings);
 }
Exemple #6
0
 public int GetGenerationOfCurrentBest(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.CurrentGeneration);
 }
Exemple #7
0
 public int GetCurrentSimulationGeneration(BestCreaturesOverlayView view)
 {
     return(evolution.CurrentGenerationNumber);
 }
Exemple #8
0
 public int GetAutoplayDuration(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.AutoplayDuration);
 }
Exemple #9
0
 public bool IsAutoplayEnabled(BestCreaturesOverlayView view)
 {
     return(bestCreatureController.AutoplayEnabled);
 }
Exemple #10
0
 public void DidClickOnPipView(BestCreaturesOverlayView view)
 {
     visibleScreen = VisibleScreen.Simulation;
     Refresh();
 }
Exemple #11
0
 public void DidChangeAutoplayDuration(BestCreaturesOverlayView view, int duration)
 {
     bestCreatureController.AutoplayDuration = duration;
 }
Exemple #12
0
 public void DidChangeAutoplayEnabled(BestCreaturesOverlayView view, bool enabled)
 {
     bestCreatureController.AutoplayEnabled = enabled;
 }