def steels_basic_experiment_GG(inc_category_treshold=0.95, classifier=None, interaction_type="GG", beta=1., context_size=4, stimuli=None, agents=None, dump_freq=50, alpha=0.1, sigma=1., num_iter=1000, topology=None): classifier, classif_arg = SteelsClassifier, [] #agents = [Agent(SteelsAgentStateWithLexicon(classifier()), SimpleSensor())\ # FIX THIS !! classif_arg = def_value(classif_arg, []) for agent in agents: agent.set_state(SteelsAgentStateWithLexicon(classifier(*classif_arg))) agent.set_sensor(SimpleSensor()) agent.set_fitness_measure("DG", metrics.get_DS_fitness()) agent.set_fitness_measure("GG", metrics.get_CS_fitness()) AdaptiveNetwork.def_alpha = float(alpha) AdaptiveNetwork.def_beta = float(beta) ReactiveUnit.def_sigma = float(sigma) DiscriminationGame.def_inc_category_treshold = float(inc_category_treshold) return steels_uniwersal_basic_experiment(num_iter, agents, GuessingGame(None, context_size), topology=topology, dump_freq=dump_freq, stimuli=stimuli)
def __init__(self, reactive_units=None, alpha=None, beta=None): """ Must be with weights ! """ self.units = def_value(reactive_units, []) self.alpha = np.longdouble(def_value(alpha, AdaptiveNetwork.def_alpha)) self.beta = np.longdouble(def_value(beta, AdaptiveNetwork.def_beta))
def __init__(self, context_len=4, inc_category_treshold=None): self.context_len = context_len self.inc_category_treshold = def_value(inc_category_treshold, DiscriminationGame.def_inc_category_treshold)
def __init__(self, context_len=4, inc_category_treshold=None): self.context_len = context_len self.inc_category_treshold = def_value( inc_category_treshold, DiscriminationGame.def_inc_category_treshold)