{"id":18546801,"url":"https://github.com/miselico/mas-gameplatform","last_synced_at":"2025-10-24T06:08:01.297Z","repository":{"id":71731155,"uuid":"55371912","full_name":"miselico/mas-gameplatform","owner":"miselico","description":"A game platform based on the Jade multi-agent system. Players are agents tasked with cleaning or soiling rooms.","archived":false,"fork":false,"pushed_at":"2018-02-22T22:30:15.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T21:13:00.614Z","etag":null,"topics":["agent-platform","cleaning-agent","jade-multi-agent"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miselico.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-03T22:20:05.000Z","updated_at":"2016-04-03T22:21:17.000Z","dependencies_parsed_at":"2023-05-10T17:45:44.723Z","dependency_job_id":null,"html_url":"https://github.com/miselico/mas-gameplatform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miselico/mas-gameplatform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miselico%2Fmas-gameplatform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miselico%2Fmas-gameplatform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miselico%2Fmas-gameplatform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miselico%2Fmas-gameplatform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miselico","download_url":"https://codeload.github.com/miselico/mas-gameplatform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miselico%2Fmas-gameplatform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261060157,"owners_count":23103986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-platform","cleaning-agent","jade-multi-agent"],"created_at":"2024-11-06T20:27:01.040Z","updated_at":"2025-10-24T06:08:01.223Z","avatar_url":"https://github.com/miselico.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository contains a framework build on top of the Jade multi-agent platform.\nThe framework supports the creation of cleaning agents and their adversaries (the dirtiers).\nThese agents can be programmed using custom logic and their goal is to clean (respectively soil) the rooms.\nThe easiest way to get started is by following the exercise below.\n\nThis project was part of the teaching material developed by Michael Cochez to be used as part of the TIES454 \"Agent technologies for developers\" course at the university of Jyväskylä.\nThe source code is released under the GPLv3 license (see license.txt).\nThe following task was performed by the students based on this platform.\n\n\nAgent Coordination, Resource allocation, and Learning\n==============================\n\nGoal\n----\nAfter completing these exercises the student should have a deeper understanding on how agents can collaborate in an environment with restricted resources. \nFurther, he or she gets a chance to implement basic learning algorithms.\nConcepts covered are coordination, software robots, sensors and actuators, and resource allocation.\n\nPrerequisites\n-------------\n\nAttendance to the first six [lectures by Vagan](http://www.cs.jyu.fi/ai/vagan/ties453.html) is recommended. Otherwise, self-study of the materials is necessary.\nMost of the the concepts used are dealt with in the theory part of the course.\n\nBasic knowledge of the Jade Agent platform.\n\nYou must have knowledge of programming in Java or be prepared to work on your skills during the course.\n\nTasks\n-----\n\nThis assignment is loosely based on the essay which needs to be written for the theoretical course.\nThe goal is to program agents (software robots) such that they together keep the space in which they are placed as clean as possible.\n\nThe assignment consists of 4 parts, which you are advised to make in order.\nThe first task introduces the *cleaners*. The goal is to clean a rectangular room.\nThe second task introduces more advanced *sensors* and *actuators* the cleaners can use as well as their opponents, the *dirtiers*.\nThe third task focuses on coordination of multiple cleaners to avoid parts of a room being cleaned twice.\nIn the fourth task you have to program an efficient team of cleaning robots which cleans on maps with several rooms of varying sizes  as fast as possible.\nIn this final task you also have to create a team of dirt spreaders.\n\nThese tasks are performed in team of 1 to 3 students. You have to use Java 8 for these tasks (Java 7 won't do).\n\n### Task 0 - Obtaining the project ###\n\nThe teacher has prepared a project in a git repository for each group. Inform the teacher to be assigned a group.\nOnce assigned to a group, you can clone the project using `git clone git@yousource.it.jyu.fi:ties454-2016-assignment3/group\u003cnr\u003e.git`\n\nThe project contains two packages: \n\n* `fi.jy.ties454.cleaningAgents`, which is the basic platform.\nNormally you won't change the code in that package.\n* `fi.jyu.ties454.assignment3.group0`, which contains basic skeletons for the first two tasks.\n\nTo start working, make a copy of the `fi.jyu.ties454.assignment3.group0` package and change the group number to the one you received.\nAll code of this assignment must be placed in that package. \nThe first skeleton can be found in `fi.jyu.ties454.assignment3.group\u003cnumber\u003e.task1`, the second one in `fi.jyu.ties454.assignment3.group\u003cnumber\u003e.task2`, and so on.\n\nAlso make a copy of the resource folder `/src/main/resources/fi/jyu/ties454/assignment3/group0` to `/src/main/resources/fi/jyu/ties454/assignment3/group\u003cgroupnumber\u003e`.\n\n### Task 1 - Cleaning the rectangle ###\n\nIn this first task you have to write the code for a cleaning robot which has to clean a rectangular room.\nThe skeleton for this task is already created. Carefully read the comments on the `fi.jyu.ties454.assignment3.group\u003cnr\u003e.task1.MyCleaner` class.\nTo start the simulation, you need to execute the `fi.jyu.ties454.assignment3.group\u003cnr\u003e.task1.Run` class. \n\nIf the simulation runs to slow to your liking, read the hints below.\n\n### Task 2 - Advanced sensors and enemies ###\n\nThe actuators used up till now are a bit boring. The only things you could do were making one step, rotating, and cleaning.\nObviously, cleaning gets more fun with better gear.\nTherefore, you can buy additional sensors and actuators for your agent.\nTo obtain these, your cleaning agent needs to send a message to the Manager.\nIf your team still has budget (the total budget is 12,000), the manager will install the part onto your agent.\nSince sending this kind of messages is common, it has been implemented in the `getDevice()` method.\nSee the skeleton code for an example.\n\nThe following parts are available from the `fi.jyu.ties454.cleaningAgents.infra.DefaultDevices` class. \nSee the javadoc of the DefaultDevices class for more information on how they work.\nNote that there are also parts for making the rooms dirty. Your cleaning agents do not want these!\n\n|part       |cost|speed|\n|-----------|--|--|\n|AreaCleaner| exp | normal |\n|AreaDirtier| middle | normal |\n|BasicBackwardMover| cheap | slow |\n|BasicCleaner| free | normal |\n|BasicDirtier| free | slooow |\n|BasicDirtSensor| free | fast |\n|BasicForwardMover| free | slow |\n|BasicRotator| free | normal |\n|BasicWallSensor| middle | fast |\n|DirtExplosion| middle | instant |\n|FrogHopperForwardMover| exp | instant |\n|HighProbabilisticDirtSensor| middle | faster |\n|JackieChanRotator| middle | instant |\n|JumpForwardMover| middle | fast |\n|LaserDirtSensor| expensive | fast/instant depending on function|\n|LeftMover| middle | fast |\n|LowProbabilisticDirtSensor| cheap | faster |\n\nWhere free = 0, cheap = 500, middle = 1,500, and exp = 3,000. \nFor speeds (at default timeFactor of 50, see below), slooow = 2.5s, slow = 1.25s, normal = 0.5s, fast = 0.25s, faster = 0.05s, instant = 0s.\n\nYour task is to create a cleaning agent which attempts to clean the dirt which the `MyDirtier` agent creates.\nThe agent you create can use all available sensors and actuators (but mind the budget of 12,000).\nOnce you are happy with your agent, you can let the simulation run for 150 seconds (2.5 minutes).\nAfter that the simulation will stop and inform what the average amount of dirt in the rooms was.\nYour goal is to get that number down.\n(Don't spent too much time on this, there is no point trying to find the perfect solution.)\n\n\n### Task 3 - Coordinating multiple cleaners ###\n\nWhen multiple cleaners are started, they all start on the same location (still, this same location will be different each time you run).\nMultiple dirtiers, however, start each on a different location.\n\nFor the third task you have to create three cleaners which together clean the area (while two provided agents are making it dirty again).\nThe point of this task is to make the agents work together and use each other's capabilities.\nFor example:\n\n* You do not want to clean the same area multiple times in a short time.\n    * You only want to clean if it is likely that there is dirt in a location.\n    * Moreover, you do not have the budget to give each of these agents a good dirt sensor, moving ability, cleaning device, etc.\n* While cleaning, you cannot be moving, so why have a fast moving robot cleaning.\n* If you want to map the environment it only has to be done once (assuming unchanging room shapes).\n* etc.\n\nConcrete, you need to implement the system such that there is one leader agent which collects the information from the others and spreads it back.\nThis could be done by something like the publish subscribe system which was created in the first assignment.\nFor this assignment you are allowed to use the `void setContentObject(Object)` method of the ACLMessage. This saves a fair bit of work encoding and decoding.\nThere are several pieces of information which could be send around: valid areas, dirty areas, cleaned areas, ...\nTo keep the map of the area in the agent you can consider the `com.google.common.collect.Table` type in the guava library.\n\nSince all agents start at the same position, you can keep track of their relative locations.\nA class called Tracker has been prepared which can be used for tracking the location of the robot relative to the starting point.\nAn example of its usage can be found in the `fi.jyu.ties454.cleaningAgents.example.cleaning.PoorCleaner` class.\nNote that the tracker class uses a coordinate system which is typical for computer graphics programming.\n\n\u003cimg src=\"img/AxisOrientation.svg\" alt=\"Orientation of the axis of the tracker.\"/\u003e\n\n\n\nAs a map, you could use the `rectangleRoomLargeClean.txt` or create your own more complicated map.\n\n### Task 4 - Multiple rooms - competition ###\n\nUp till now there has only been one room to clean. This tasks adds the complexity that there can be multiple rooms.\nTo make things easier, you only have to consider maps with rectangular rooms (always 4 corners), there are no doors at the corner points, and doors always consist of one cell.\n\nYou have two sub-tasks:\n\n1. Create a team of 3 agents able to clean multiple rooms. The agents should be generic, i.e., able to clean any kind of environment. \n2. Create a team of 2 agents which make rooms dirty. \n\nDuring the final session we will let the agents of different teams fight with each other and find out who has the best cleaners and the best soilers. \n\nDon'ts of the game:\n\n* Don't use reflection to change values you won't have access to otherwise\n* Don't start extra threads\n* Don't attempt denial-of-service type attacks\n* Don't send messages on other agents' behalf\n* If you think you are cheating, you probably are\n\n\nFloor file format\n-----------------\nThe file format for the floor maps is as follows:\nThe map consists of cells and each cell is represented by one character.\n\n* *C* indicates a clean cell\n* *#* indicates a dirty cell\n* *'\u0026nbsp;'* (a space) indicates an empty cell, i.e. where there is no floor.\n\nWalls are created by inserting spaces between areas consisting of other characters. \nDoors are creating by a normal cell.\nHence, the following is an example of three rooms - two clean ones and a dirty one - connected by doors:\n\n    CC CCCCC ####\n    CCCCCCCCC####\n    CC CCCCC ####\n    CC\n\nReturning the assignment\n------------------\nThe deadline for this assignment is February 29. During session on March 2 you will get feedback on your work.\nThen there is still about a week of time to get things in shape for the final session March 9.\n\nThe teacher created a repository for each group in yousource and added the starter code to it.\nWhen you inform your group members to the teacher you will be added as a collaborator.\n\nThe repository can be cloned from  `git@yousource.it.jyu.fi:ties454-2016-assignment3/group\u003cnr\u003e.git` (replace \u003cnr\\\u003e with your group number).\n\nIn the repository you place \n\n1. The maven project (code + resources (maps) + pom.xml file)\n2. A readme file with \n    * The names of your groups' members\n    * Extra information if you think it is needed\n    \n\n\nHints\n-----\n\n1. The agent platform is a normal Java program. Debuggers can be used normally. It is also useful to combine the debugger and the sniffer in the JADE GUI: one can stop the agents, then start the sniffer and watch all messages being sent.\n\n2. The class `fi.jyu.ties454.cleaningAgents.infra.DefaultDevices` has a constant called `timeFactor` (near the bottom where many constants are defined).\nChanging this constant (lower) speeds up or (higher) slows down the simulation. Putting this number too low (under 10) makes results unreliable.\nFeel free to change this while programming. The original value is 50.\n\n3. Robots which are programmed using lots of randomness tend to stay in the same room for a fair amount of time because they will rarely find the door.\n\n4. You can copy the map in a certain state from the GUI and paste it into a text file. This file can then be loaded as the state next time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiselico%2Fmas-gameplatform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiselico%2Fmas-gameplatform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiselico%2Fmas-gameplatform/lists"}