Search
A group of four miners is facing an uneasy task. It is deployed to a gold mine and the miners have to collect all gold stones scattered around the mine and bring them all to one of the company depots. The company is saving money wherever it can and the stones they have to carry are becoming more and more heavy. At this point, these stones have become that heavy that no single one of them can lift them alone. Every time a miner wants to lift a stone, he must call some friend to help him. Will you help them to collect all the gold stones in time?
Scenario 1: On day one, they were quite lucky. They have arrived in a tidy gold mine and they may go wherever they want. The only problem here is that the work is still in progress and new gold stones appear from time to time. Whenever a gold stone appears somewhere in the mine, miners must be able to find it and bring it to a depot. If the miners do succeed, they will be awarded 2 points. (see task0.txt)
task0.txt
Scenarios 2-8: The conditions in the mine get more and more challenging on the subsequent days. Debris is scattered around the mine and the miners are still asked to perform what they are paid for – collecting the gold! Make your agent navigate through these mines obstructed by heavy machinery and other obstacles and make them succeed! Miners get 1 point for every scenario they complete successfully. (see task1.txt-task7.txt - we will evaluate the performance of your mining team on slightly modified versions of these scenarios)
task1.txt
task7.txt
Competition: The group of the miners was proven to be highly competent and thus the managers have decided to send them to a mining competition. 25% fastest groups of miners will be awarded another 1 point.
Mining research The conditions in the mining industry are getting worse every day. If you think your group of miners can overcome even greater difficulties, they may be awarded some extra points (after prior discussion with the tutor).
Rules:
sense()
Java project (applicable also for implementations in other languages!)
You should implement your solution inside student.Agent class (and possibly other classes of your need within the student package). You can test your solution by launching mas.agents.SimulationCore [map file] where [map file] is the name of scenario you want to test. If you want to be sure that your agents do not share any knowledge, you can use mas.agents.SimulationCore [map file] ~ (this setting may complicate debugging).
student.Agent
student
mas.agents.SimulationCore [map file]
[map file]
mas.agents.SimulationCore [map file] ~
If you are willing to implement your solution in other languages (e.g., Python, C/C++), please refer to the section below. Also, if you want to implement your solution in languages other than Python and C/C++, let us know about that beforehand (we need to verify that we can easily test your solution first).
Create a zip archive containing the content of the student package and your report in PDF format and submit it to the upload system. If you do not have access to the upload system, please send your files to karel.horak@agents.fel.cvut.cz.
WARNING: This is an experimental feature. You will be left in an uncharted territory. Use at your own risk! We will try to fix problems that may arise - but you are expected to be confident in the programming language of your choice.
To implement your agent, you are expected to write a program that accepts a single command-line argument (the ID of the agent) and communicates through standard input/output. Use standard output to send messages to other agents/environment, use standard input to receive messages from other agents.
[recipient] [sender] [messageID] [queryData] : [content]
[recipient]
0
[sender]
[messageID]
[queryData]
Q
R[messageID]
-
[content]
!
To communicate with the environment and perform actions, send a message to agent 0. You will receive an answer containing your current percepts. Valid actions are: !left, !right, !up, !down, !pick, !drop, !sense.
!left
!right
!up
!down
!pick
!drop
!sense
Example message: 0 1 42 Q : !left (agent 1 wants to move left)
0 1 42 Q : !left
The environment reply with a message: 1 0 839 R42 : !status [agentX] [agentY] [width]x[height] [percepts]
1 0 839 R42 : !status [agentX] [agentY] [width]x[height] [percepts]
[agentX]
[agentY]
[width]
[height]
[percepts]
[type][x],[y]
[type]
O
D
G
A
[x]
[y]
Example message: 1 0 839 R42 : !status 10 10 20×20 A9,10 O11,10 O10,11
1 0 839 R42 : !status 10 10 20×20 A9,10 O11,10 O10,11
Send !ready action to the environment (similarly to actions above). Start execution upon receiving [agentID] 0 [messageID] - : !start.
!ready
[agentID] 0 [messageID] - : !start
To evaluate your agent, run the class SimulationCore with one extra parameter: mas.agents.SimulationCore [mapFile] [pathToAgentExecutable]
SimulationCore
mas.agents.SimulationCore [mapFile] [pathToAgentExecutable]
Currently we plan to support Python and C / Cpp. To submit your solution, submit an archive containing main.py / main.c / main.cpp along with your PDF report.
main.py
main.c
main.cpp