Neural Network and Multi-Agent System Hybrid Framework.
NeuralMAS is composed of a Koinè-DALI MAS, a Keras Neural Network and NeuralRedis, a module I made to manage Redis and the Dataset, so that the Dataset can be easily changed with another one.
The Neural Network has been developed using Keras library, running on top of TensorFlow. See:
Keras is very powerful and can run on top of Theano or CNTK too, but you can use a different technology of your choise insted of it.
The Multi-Agent System (MAS) has been developed using DALI, or better Koinè DALI, running on top of SICStus Prolog. See:
- https://github.com/agnsal/KOINE-DALI
- https://github.com/AAAI-DISIM-UnivAQ/DALI
- https://sicstus.sics.se/ You can choose to develop the MAS with a different technology instead of it.
The communication channel between the Neural Network and the MAS is made using Redis. See:
You can use it on both Linux and Windows, and it is compatible with Docker too (so you can use it on distributed Systems too): See:
For more information, see NeuralMAS.pdf.
- To install Redis see: https://redis.io/
- To install Keras and Tensorflow see: https://keras.io/ and https://www.tensorflow.org/
- To install SISCtus Prolog see: https://sicstus.sics.se/
- To install numpy and Keras dependencies:
sudo pip3 install h5py
sudo pip3 install numpy
- To get NeuralMas:
git clone https://github.com/agnsal/NeuralMAS.git
- To get KOINE-DALI and its dependencies and include it in this project:
cd NeuralMAS
git clone https://github.com/agnsal/KOINE-DALI.git
cd KOINE-DALI/DALI
git clone https://github.com/AAAI-DISIM-UnivAQ/DALI.git
mv DALI/* .
rm -rf DALI
cp -r KOINE-MAS-example KOINE-MAS-hospital
rm -rf KOINE-MAS-hospital/mas
mv ../../mas KOINE-MAS-hospital/
- To join the trained net file pieces and decompress it:
cd ../..
cat LetterNet.h5* > LetterNet.h5.tar.gz
tar -xvzf LetterNet.h5.tar.gz
- To start the MAS:
cd KOINE-DALI/DALI/KOINE-MAS-hospital/conf
chmod u+rx makeconf.sh
chmod u+rx startagent.sh
cd ..
sudo bash startmas.sh # Or sudo bash startmasMary.sh if you prefer a single window MAS
The agents will say when they finish the handshake.
- Open another terminal window to monitor Redis:
redis-cli monitor
- In another terminal window, to open the communication channel between the Neural Net and the MAS:
cd NeuralMAS/KOINE-DALI
python3 Redis2LINDA.py
- In another terminal window, to start the Neural Net:
cd NeuralMAS
python3 BreastCancerNet.py
- In another terminal window, to make some queries, about the dataset (for example):
redis-cli
rpush neuralNetQueryList [776715,3,1,1,1,3,2,1,1,1]
rpush neuralNetQueryList [897471,4,8,8,5,4,5,10,4,1]
and so on. You can see the data obtained by the Net and by the MAS via the Redis monitor.
- To stop the MAS just press a button.
Agnese Salutari – [email protected]
Distributed under the Apache 2.0 license. See LICENSE
for more information.