Good day,
I am working with Levelspace since I want to create a model of Agents with brains. I have two files:
- the master containing the environnement within which agents without brain can evolve with simple rules
- the child containing the brain every agent will have after binding the two files.
I want to pass informations from the child models to the master so I am using this kind of code in the master:
print [vecteur_binaire] ls:of ls:models
with vecteur_binaire a function of the child model. But I noticed that the code above do work only for globals and that it doesn't work for functions. For example, with the code above, it will return : " Extension exception: Model 0 (brain of (herbivore 0)) encountered an error: ITEM expected input to be a string or list but got the number 0 instead. error while herbivore 1 running LS:OF called by procedure CHOOSE_AND_MOVE_HERBIVORE called by procedure MOVE called by procedure GO called by Button 'go'"
this error highlighting the "ls:of" of the code. I really do not understand what is happening and why I have this error message. Moreover, becuause of this, I can't run my child model and so make brains work well.
Do you know houw to solve it?
Thank you very much in advance for your reponse!
Juliette
More complete code:
In the master:
to choose_and_move_herbivore [in]
(ls:assign in visual_input [ vision ] of self )
print [vecteur_binaire] ls:of in
end
with "in" the id number of the child model.
In the child model:
to-report vecteur_binaire
go
report o_t
end
with "go" another function calling other functions in the programm to make brains work, and o_t the value that interests me.