Esempio n. 1
0
	public int currentTrialForEdit = 0;  // keeps track of which trial index is currently being edited while in Fitness/Mini-game Panels
		// For Each Trial:
		// MiniGame Class to store gametype and settings
		// Fitness Function Class w/ Fitness component list and settings


	// Constructor Functions:
	public Player() {   
		DebugBot.DebugFunctionCall("Player; Player() Constructor!; ", debugFunctionCalls);
		InitializeNewPopulation();
		masterTrialsList = new List<Trial>();
		Trial newTrial = new Trial(this); // make trials list one member long, with a None mini-game value
		masterTrialsList.Add(newTrial);
		masterCupid = new CrossoverManager();
		dataManager = new DataManager(this);
		graphKing = new TheGraphKing();
		//newTrial.playerRef = this;

	}
Esempio n. 2
0
 public void InitializeLoadedPopulation()
 {
     // Assumes template has been set from defaults!
     ResetRepresentativesList();
     fitnessManager.InitializeLoadedData(agentGenomeList.Count);
     graphKing = new TheGraphKing();
     // ENV:
     //ResetRepresentativesList();
     // Fitness Manager
     //fitnessManager.InitializeLoadedData(popSize);
     // Training Settings Manager:
     // -- so simple at this point no init is needed, it's just 2 floats
 }
Esempio n. 3
0
    public int currentTrialForEdit = 0;      // keeps track of which trial index is currently being edited while in Fitness/Mini-game Panels
    // For Each Trial:
    // MiniGame Class to store gametype and settings
    // Fitness Function Class w/ Fitness component list and settings


    // Constructor Functions:
    public Player()
    {
        DebugBot.DebugFunctionCall("Player; Player() Constructor!; ", debugFunctionCalls);
        InitializeNewPopulation();
        masterTrialsList = new List <Trial>();
        Trial newTrial = new Trial(this);         // make trials list one member long, with a None mini-game value

        masterTrialsList.Add(newTrial);
        masterCupid = new CrossoverManager();
        dataManager = new DataManager(this);
        graphKing   = new TheGraphKing();
        //newTrial.playerRef = this;
    }
Esempio n. 4
0
    // Representative system will be expanded later - for now, just defaults to Top # of performers
    public PlayerPopulation(Challenge.Type challengeType, BodyGenome bodyTemplate, int numGenomes, int numBaseline, int numReps)
    {
        bodyGenomeTemplate = new BodyGenome();
        bodyGenomeTemplate.CopyBodyGenomeFromTemplate(bodyTemplate);

        graphKing = new TheGraphKing();

        popSize          = numGenomes;
        this.numBaseline = numBaseline;

        // Create blank AgentGenomes for the standard population
        agentGenomeList    = new List <AgentGenome>();
        historicGenomePool = new List <AgentGenome>();
        baselineGenomePool = new List <AgentGenome>();

        for (int j = 0; j < numGenomes; j++)
        {
            AgentGenome agentGenome = new AgentGenome(j);
            agentGenome.InitializeBodyGenomeFromTemplate(bodyGenomeTemplate);
            agentGenome.InitializeRandomBrainFromCurrentBody(0.0f);
            agentGenomeList.Add(agentGenome);
        }
        RepopulateBaselineGenomes();
        AppendBaselineGenomes();

        // Representatives:
        numPerformanceReps = numReps;
        ResetRepresentativesList();
        historicGenomePool.Add(agentGenomeList[0]); // init

        fitnessManager = new FitnessManager();
        SetUpDefaultFitnessComponents(challengeType, fitnessManager);
        fitnessManager.ResetHistoricalData();
        fitnessManager.ResetCurrentHistoricalDataLists();
        fitnessManager.InitializeForNewGeneration(agentGenomeList.Count);

        trainingSettingsManager = new TrainingSettingsManager(0.01f, 0.8f, 0.2f, 0.005f);
    }