Remote agent: Difference between revisions

m
added a blank line
(Updated commands to include color information.)
m (added a blank line)
 
(5 intermediate revisions by 2 users not shown)
Line 1:
{{Vptopic
|topic=Remote agent
|summary=A set of three tasks revolving around the concept of a remote agent
}}
This is 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. Read on below for a complete description of the virtual world, interface commands and stream protocol.
 
Line 9 ⟶ 5:
# [[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. The stream protocol below should be common among all implementations; any agent interface implementation should work equally well with any of the world simulation implementations.
Line 43 ⟶ 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 120 ⟶ 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 134 ⟶ 131:
== Commands and event codes ==
 
{| class="wikitable"
{|border=1
|-
|name||type||character||decimal||hex
|-
|forward||command||B^||6694||0x420x5E
|-
|clockwiseturn right||command||C>||6762||0x430x3E
|-
|counterclockwiseturn left||command||D<||6860||0x440x3C
|-
|get||command|||E@||6964||0x450x40
|-
|drop||command||F!||7033||0x460x21
|-
|game over||event||G+||7143||0x470x2B
|-
|stop||event||H.||7246||0x480x2E
|-
|color (red)||event||IR||7382||0x490x52
|-
|color (green)||event||JG||7471||0x4A0x47
|-
|color (yellow)||event||KY||7589||0x4B0x59
|-
|color (blue)||event||LB||7666||0x4C0x42
|-
|ball (red)||event||Mr||77114||0x4D0x72
|-
|ball (green)||event||Ng||78103||0x4E0x67
|-
|ball (yellow)||event||Oy||79121||0x4F0x79
|-
|ball (blue)||event||Pb||8098||0x500x62
|-
|bump||event||Q<nowiki>|</nowiki>|81|124|0x51|0x7C
|-
|nosector ball in sectorfull||event||RS||8283||0x520x53
|-
|noagent ball in agentfull||event||SA||8365||0x530x41
|-
|sectorno fullball in sector||event||Ts||84115||0x540x73
|-
|agentno fullball in agent||event||Ua||8597||0x550x61
|}
7,794

edits