Beispiel #1
0
 public FieldSubs3LNetworkEvaluator(NeatQTableBase neatQTable)
 {
     m_neatQTable = neatQTable;
     //Debug.Assert(m_neatQTable != null);
     // we put (cols + 2) columns in substrate to allaw players to go beyond the columns and score a goal
     m_substrate = new MultiLayerSandwichSubstrate(neatQTable.Rows, neatQTable.Cols + 2,
                                                   NeatExpParams.SubstrateLayers, NeatExpParams.AddBiasToSubstrate,
                                                   HyperNEATParameters.substrateActivationFunction);
 }
        public CCEAGeomCtrlExperiment(NeatQTableBase qTable, int numCPPNInputs, int numCPPNOutputs)
        {
            //Debug.Assert(qTable != null);
            m_neatQTable = qTable;

            m_numCPPNInputs  = numCPPNInputs;
            m_numCPPNOutputs = numCPPNOutputs;

            m_fieldWidth  = qTable.NeatClient.EnvCols;
            m_fieldHeight = qTable.NeatClient.EnvRows;
        }
Beispiel #3
0
        public CCEAGeomCtrlNetworkEvaluator(NeatQTableBase neatQTable)
        {
            m_neatQTable = neatQTable;
            //Debug.Assert(m_neatQTable != null);
            // we put (cols + 2) columns in substrate to allaw players to go beyond the columns and score a goal
            m_substrateBallOwner = new GeomPlayerSubstrate(NeatExpParams.AddBiasToSubstrate,
                                                           HyperNEATParameters.substrateActivationFunction, 0);

            m_substrateNotBallOwner = new GeomPlayerSubstrate(NeatExpParams.AddBiasToSubstrate,
                                                              HyperNEATParameters.substrateActivationFunction,
                                                              NeatExpParams.AddBiasToSubstrate ? 2 : 1);
        }
Beispiel #4
0
        public static FourDFieldSubsExperiment GetExperiment(NeatQTableBase qTable, int agentId)
        {
            lock (agentConnectionLock)
            {
                if (s_singleInstance == null)
                {
                    s_singleInstance = new FourDFieldSubsExperiment(8,
                                                                    NeatExpParams.AddBiasToSubstrate ? 4 : 2);
                }

                s_singleInstance.AddAgent(qTable, agentId);
            }
            return(s_singleInstance);
        }
        public CCEANEATFFCtrlNetworkEvaluator(NeatQTableBase neatQTable)
        {
            m_neatQTable = neatQTable;
            //Debug.Assert(m_neatQTable != null);
            // we put (cols + 2) columns in substrate to allaw players to go beyond the columns and score a goal
            m_substrateBallOwner = new TwoLayerSandwichSubstrate(neatQTable.Rows, neatQTable.Cols + 2,
                                                                 NeatExpParams.AddBiasToSubstrate, HyperNEATParameters.substrateActivationFunction, 0);
            m_substrateNotBallOwner = new TwoLayerSandwichSubstrate(neatQTable.Rows, neatQTable.Cols + 2,
                                                                    NeatExpParams.AddBiasToSubstrate, HyperNEATParameters.substrateActivationFunction,
                                                                    NeatExpParams.AddBiasToSubstrate? 2 : 1);

            //m_substrate = new BallOwnerAwareSubstrate(neatQTable.Rows, neatQTable.Cols + 2,
            //    HyperNEATParameters.substrateActivationFunction);
        }
Beispiel #6
0
        private void AddAgent(NeatQTableBase qTable, int agentId)
        {
            if (m_neatQTables == null)
            {
                m_neatQTables = new NeatQTableBase[Program.Teammates];
            }

            //Debug.Assert(qTable != null);
            m_neatQTables[agentId] = qTable;

            m_fieldWidth  = qTable.NeatClient.EnvCols;
            m_fieldHeight = qTable.NeatClient.EnvRows;

            numAgentsConnected++;
            if (numAgentsConnected == Program.Teammates)
            {
                s_singleInstance.m_eventAllAgentsRegistered.Set();
            }
        }