Help on Using a Neural Network

160 views
Skip to first unread message

Guilherme Mendel

unread,
Jul 14, 2022, 4:25:31 PM7/14/22
to gama-p...@googlegroups.com
Hello all!

This is my first time working with Gama. I have a multi-agent project in which I intend to apply some Deep Reinforcement Learning algorithm, which means I'll have to somehow integrate a deep neural network to the project's GAML code.

I don't have a specific deep learning library in mind, anything will do, really. I just need to be able to integrate the project with deep learning.

Problem is, I don't seem to be able to find any documentation on how to integrate the project with external libraries, and I'm sure coding a neural network in GAML wouldn't be practical for many reasons.

How could I go about this? Would it be possible to maybe use some Java deep learning library extension? I'm at a loss for viable ideas. Any help would be deeply appreciated!

Thank everyone for your attention.

lesquoy....@gmail.com

unread,
Jul 14, 2022, 11:08:55 PM7/14/22
to GAMA
Hello,

We achieved something very similar to what you are describing, by making a python deep reinforcement learning model interact with a gama simulation to "help" the agents from the simulation to take the best actions given the state of the simulation. The main idea was to create a python program that would start gama in headless mode (see this documentation) and start our simulation, then run the neural network (using tensorflow in our case) and in the main loop of the program having both interacting through a tcp socket (on localhost) to read and send data. For the python part we simply used the standard socket library, and for the gama part we added the network skill to our global agent.

Hope this can help you,

Baptiste Lesquoy

Benoit Gaudou

unread,
Jul 15, 2022, 2:08:16 AM7/15/22
to gama-p...@googlegroups.com
Dear,

An alternative approach is  the  one developed in the GamPy plugin (cf. slides attached):
you train your ML/DL model in Python and then you use it  directly in  the GAML model.
I am not really sur of what is your need and if  this way could  fit your need: in this case there is no update  of  the AI model during the simulation.

Cheers

Benoit

--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gama-platform/fb71694d-42e4-4144-aab0-6792a04e101bn%40googlegroups.com.
Gampy slide.pdf

Guilherme Mendel

unread,
Jul 18, 2022, 4:29:36 PM7/18/22
to GAMA
Hi everyone!

Kevin Chapuis helped drawing my attention to the fact that I'd have to check the google groups in order to see these answers, which is why I hadn't seen them till now.
Thanks everyone for your very detailed answers! They will be invaluable to me going ahead with my project.

I wish you all a great week!
Reply all
Reply to author
Forward
0 new messages