Package: peak-mas
PEAK: Python-based framework for heterogenous agent communitiesPEAK is a multi-agent system framework which helps the users develop, monitor, analyze and maintain ecosystem of heterogeneous agent communities. This ecosystem is  where various multi-agent systems can coexist, interact and share resources between them.
This framework is based onSPADE.PrerequisitesPython == 3.9.6XMPP Server (see docs)Installing PEAKCondaTo install using conda, download the environment.yml file from the repository and then use the following command:$condaenvcreate--fileenvironment.ymlThis will create a conda environment calledpeak.PipTo install using pip, just type the following command:$pipinstallpeak-masUsing PEAKNotes on SPADEAs already said PEAK is based on SPADE. This means that every functionality of SPADE is available to the user. We highly recommend you to seeSPADEexamples and documentation before starting using PEAK. Once you are familiarized with SPADE's mechanics you can start using PEAK.Notes on XMPPTo run any PEAK's agent you will need a XMPP server. You can either configure one on your machine, remotely or use a public server. The only issue with the public servers is that they don't usually have all the configurations required to run some PEAK's functionalities. To configure the server you can read the "Configure XMPP server" section in thedocumentation.Hello World Agent ExampleOne thing that was added in PEAK was the way the user executes the agents. PEAK added a CLI, inspired in JADE, to help the user execute end configure each agent in a easy and intuitive manner.
In this example we will show you how to execute a single agent. Save the following code in a file calledagent.py.frompeakimportAgent,OneShotBehaviourclassagent(Agent):classHelloWorld(OneShotBehaviour):asyncdefrun(self):print("Hello World")awaitself.agent.stop()asyncdefsetup(self):self.add_behaviour(self.HelloWorld())It is necessary that the name of the file is the same as the name of the agent's class so PEAK can do the proper parsing. This agent only has a behavior that prints to the terminal the "Hello World" message. To execute the agent just type the following command:$peakrunpath/to/agent.py-jagent@localhostChange thelocalhostto the domain of the XMPP server you want to connect.NoteIf you want to know more about each command we recommend reading thedocumentationor using the-hoption to see the help message.For more advanced functionalities and examples we recommend you to head forward to thedocumentation website.SupportUse theDiscussionpage if you have any questions or ideas you would like so see implemented.
To alert an issue or a bug please post in theIssuespage.RoadmapThis are some functionalities that are being developed and will be released in a near future:Integrate FIPA ACL messages in PEAK.Add dynamic speed option to PEAK's internal clock.Add multi-threading option to the Command Line Interface.Implement Yellow Page Service in the Directory Facilitator agent.Implement physical mobility in the agents.Scientific PublicationsRibeiro, B., Pereira, H., Gomes, L., Vale, Z. (2023). Python-Based Ecosystem for Agent Communities Simulation. In: ,et al.17th International Conference on Soft Computing Models in Industrial and Environmental Applications (SOCO 2022). SOCO 2022. Lecture Notes in Networks and Systems, vol 531. Springer, Cham.https://doi.org/10.1007/978-3-031-18050-7_7Contributing to PEAKPull requests are welcome. For major changes, please open a discussion first to discuss what you would like to change.The examples are used as a form of testing the framework. So please make sure to update the examples as appropriate or make new ones.To format the code please use theblackandisortpackages.For the commits please follow theConventional Commits Guideline.LicensePEAKis free and open-source software licensed under theGNU General Public License v3.0.