Remote agent: Difference between revisions

m
added a blank line
(→‎Map generation: Clarification, to avoid isolation.)
m (added a blank line)
 
(11 intermediate revisions by 3 users not shown)
Line 1:
I'mThis working onis a set of three tasks revolving around the concept of a 'remote agent.' The overarching theme of the task set is to have a simple, stateful world with an agent that operates on the world's state until the end conditions are met. The world is a grid of colored squares, and is populated to some percentage by colored balls. The ending condition is when all balls are in a square of the correct color. The perspective of the agent is limited; it is not given an overview of the world. It only knows its surroundings by responses to its actions. --[[User:ShortRead Circuit|Michaelon Mol]]below 07:44for a complete description of the virtual world, 14interface Februarycommands 2010and (UTC)stream protocol.
 
Each of the three tasks satisfies a different goal:
# [[Remote agent/Simulation|Implement the world simulation, accept and respond to agent commands via a stream interface]].
# [[Remote agent/Agent interface|Implement the agent side of the stream interface in a manner idiomatic to the language]].
# [[Remote agent/Agent logic|Use the agent stream interface to satisfy the end conditions]].
 
 
Here is a description of the world and commands. I haven't defined theThe stream protocol yet, but itbelow should be common among all implementations; any agent interface implementation should work equally well with any of the world simulation implementations.
 
= A description of the world =
Line 39 ⟶ 40:
* While the distribution and location of the color properties is undefined, there must not be more balls of a color than there are sectors with that color property.
* There must be at least one 'space' sector without a ball in it. (The agent does not initialize while holding a ball.)
* There may be 'wall' sectors within the area (including on the interior side of the outermost rim), but the no non-wall sector may be surrounded on four cardinal sides with wall sectors.
 
== Goal ==
Line 83 ⟶ 84:
* Will respond with a 'no ball in agent' event, if the agent has no ball.
* Will respond with a 'sector full' event, if the sector already has a ball.
* Will respond with a 'game over' event, if successful, and if all balls are in sectors matching their color.
* Will respond with a 'stop' event, once all other events have been met.
 
Line 115 ⟶ 117:
 
= Stream Protocol =
The stream protocol is simple. Every command is a single byte sent from the agent to the simulator, no line feed, no carriage return. Every event is a single byte sent from the simulator to the agent, no line feed, no carriage return. For the sake of simplicity, all bytes fall within the range of [65,90]33('!') to 124('|'), which correspondscorrespond to [A,Z]single visible grahic characters in ASCII, as well as in UTF-8.
 
== Greeting ==
Line 129 ⟶ 131:
== Commands and event codes ==
 
{| class="wikitable"
{|border=1
|-
|name||type||character||decimal||hex
|-
|'''f'''orwardforward||command||F^||7094||0x460x5E
|-
|turn right||command||>||62||0x3E
|-
|turn left||command||<||60||0x3C
|-
|get||command|||@||64||0x40
|-
|drop||command||!||33||0x21
|-
|game over||event||+||43||0x2B
|-
|stop||event||.||46||0x2E
|-
|c'''l'''ockwisecolor red||commandevent||LR||7682||0x4C0x52
|-
|color green||event||G||71||0x47
|c'''o'''unterclockwise||command||O||79||0x4F
|-
|'''g'''etcolor yellow||commandevent||Y|G|89|71||0x470x59
|-
|'''d'''ropcolor blue||commandevent||DB||6866||0x440x42
|-
|'''g'''ameball overred||event||Gr||71114||0x470x72
|-
|'''s'''topball green||event||Sg||83103||0x530x67
|-
|'''c'''olorball yellow||event||Cy||67121||0x430x79
|-
|'''b'''allball blue||event||Bb||6698||0x420x62
|-
|b'''u'''mpbump||event||U<nowiki>|</nowiki>|85|124|0x55|0x7C
|-
|'''n'''osector ball in sectorfull||event||NS||7883||0x4E0x53
|-
|n'''o'''agent ball in agentfull||event||OA||7965||0x4F0x41
|-
|sectorno '''f'''ullball in sector||event||Fs||70115||0x460x73
|-
|agentno f'''u'''llball in agent||event||Ua||8597||0x550x61
|}
7,794

edits