Changing Genes
Import
AgentClient
from moduleia.gaius.agent_client
[1]:
from ia.gaius.agent_client import AgentClient
[2]:
agent_info = {'name': '',
'domain': 'gaius-api',
'secure': False,
'api_key': 'ABCD-1234'}
[3]:
agent = AgentClient(agent_info)
[4]:
agent.connect()
[4]:
{'connection': 'okay', 'agent': 'simple'}
[5]:
agent.show_status()
[5]:
{'AUTOLEARN': False,
'PREDICT': True,
'SLEEPING': False,
'emotives': {},
'last_learned_model_name': '',
'models_kb': '{KB| objects: 0}',
'name': 'P1',
'size_WM': 0,
'target': '',
'time': 0,
'vectors_kb': '{KB| objects: 0}'}
[6]:
agent.get_all_genes(nodes=['P1'])
[6]:
{'genes': {'always_update_frequencies': False,
'auto_learn_algorithm': 'basic',
'auto_learn_metric': 'WM_size',
'classifier': 'CVC',
'max_predictions': 100,
'near_vector_count': 3,
'persistence': 5,
'predict_on_nth_event': 1,
'quiescence': 3,
'recall_threshold': 0.1,
'smoothness': 3,
'sort_metric': 'potential'}}
We can change genes using the change_genes()
api call
[7]:
agent.change_genes({'recall_threshold': 0.2}, nodes=['P1'])
[7]:
'updated-genes'
[8]:
agent.get_all_genes(nodes=['P1'])
[8]:
{'genes': {'always_update_frequencies': False,
'auto_learn_algorithm': 'basic',
'auto_learn_metric': 'WM_size',
'classifier': 'CVC',
'max_predictions': 100,
'near_vector_count': 3,
'persistence': 5,
'predict_on_nth_event': 1,
'quiescence': 3,
'recall_threshold': 0.2,
'smoothness': 3,
'sort_metric': 'potential'}}
[ ]: