Skip to content

Entities cheat sheet

Brent Yorgey edited this page Jul 15, 2024 · 18 revisions

Note, this page is auto-generated by swarm-docs cheatsheet --entities. If you notice this page is out-of-date, instead of editing it, you can help by regenerating the tables using the most up-to-date swarm executable and pasting the result here!

Entities

This is a quick-overview table of entities - click the name for detailed description.

*) As a note, most entities have the Pickable property, so we show it in a separate column.

? Name Capabilities Properties* Pickable
3 3D printer build ✔️
± ADT calculator arith, sum, prod ✔️
g Elmer's glue concat ✔️
G GPS receiver senseloc ✔️
Ю I/O cable ✔️
$ LaTeX Growable ✔️
L Linux ✔️
P PhD thesis ✔️
Y antenna meet ✔️
# ash ✔️
A atomic vector plotter ✔️
B beaglepuss appear ✔️
# big furnace ✔️
M big motor ✔️
B binoculars recondir ✔️
0 bit (0) Growable ✔️
1 bit (1) Growable ✔️
bitcoin random ✔️
B blueprint structure ✔️
w board Combustible ✔️
B boat float ✔️
@ boulder Unwalkable
box ✔️
y branch ✔️
y branch predictor cond ✔️
+ calculator arith ✔️
C caliper charcount ✔️
@ camera ✔️
# circuit ✔️
0 clock timeabs, timerel ✔️
> comparator compare ✔️
N compass orient ✔️
Å copper mine
C copper ore ✔️
I copper pipe ✔️
| copper wire ✔️
i cotton Growable, Combustible ✔️
C counter count ✔️
u cup of tea ✔️
C curry ✔️
O decoder ring code ✔️
Å deep mine
* detonator selfdestruct ✔️
D dictionary env ✔️
down and horizontal wall Unwalkable, Known
/ dozer blade push ✔️
! drill drill ✔️
! drill bit ✔️
fast grabber grab, place, give, atomic, swap ✔️
§ flash memory reprogram ✔️
* flower Growable ✔️
# furnace ✔️
glass ✔️
gold ✔️
© gold coin ✔️
< grabber grab, place, give ✔️
? halting oracle halt ✔️
h handle setname ✔️
harvester grab, harvest, place ✔️
@ hearing aid listen ✔️
horizontal wall Unwalkable, Known
8 hourglass timerel ✔️
hyperloop arith, sum, prod, rectype ✔️
I infinite improbability drive teleport ✔️
* iron gear ✔️
Å iron mine
F iron ore ✔️
iron plate ✔️
k key ✔️
K keyboard handleinput ✔️
λ lambda lambda Growable ✔️
left and vertical wall Unwalkable, Known
O lens ✔️
Ж life support system ✔️
t linotype format ✔️
o lodestone negation ✔️
l log Combustible ✔️
l logger log ✔️
lower left corner Unwalkable, Known
lower right corner Unwalkable, Known
! metal drill drill ✔️
U mirror whoami ✔️
M mithril ✔️
A mountain Unwalkable, Opaque
Å mountain tunnel
# net try ✔️
N olfactometer detectdistance ✔️
paper Combustible ✔️
. pixel (B) Growable ✔️
. pixel (G) Growable ✔️
. pixel (R) Growable ✔️
. quantum dot ✔️
Q quartz ✔️
Å quartz mine
right and vertical wall Unwalkable, Known
o rock ✔️
R rolex wakeself, timerel ✔️
% rubber ✔️
O rubber band atomic ✔️
sand ✔️
$ scanner sensefront, sensehere, scan ✔️
S silicon ✔️
silver ✔️
m small motor ✔️
# solar panel power ✔️
8 strange loop recursion ✔️
~ string format, concat, split, charcount ✔️
% tank treads move, moveheavy, turn ✔️
% tape drive backup ✔️
l tea leaves ✔️
t tea plant Growable ✔️
/ teeter-totter ✔️
Ѣ toolkit salvage ✔️
% treads move, turn ✔️
T tree Opaque, Growable, Combustible ✔️
V tweezers debug ✔️
Д typewriter ✔️
up and horizontal wall Unwalkable, Known
upper left corner Unwalkable, Known
upper right corner Unwalkable, Known
vertical wall Unwalkable, Known
Q victrola record ✔️
water Infinite, Liquid ✔️
~ wavy water Infinite, Liquid ✔️
v wedge split ✔️
f welder equip, unequip ✔️
* wooden gear ✔️
π workbench make ✔️

3D printer

  • Char: 3
  • Properties: Pickable
  • Capabilities: build

A 3D printer gives you the capability of printing more robots! You can access the 3D printer via the build command.

Example:

build {move; grab; turn back; move; give base "tree"}

builds a robot to get the tree on the cell to the north (if there is one) and bring it back to the base. The build command always returns a reference to the newly constructed robot. For example,

r <- build {move};
view r

builds a robot and then views it.

ADT calculator

  • Char: ±
  • Properties: Pickable
  • Capabilities: arith, sum, prod

A calculator with Advanced Display Technology (an attached typewriter that can print out the results). For some reason, in addition to the usual arithmetic on numbers, an ADT calculator can also do arithmetic on types! After all, the helpful typewritten manual explains, a type is just a collection of values, and a finite collection of values is just a fancy number. For example, the type Bool is just a fancy version of the number 2, where the two things happen to be labelled false and true. There are also types Unit and Void that correspond to 1 and 0, respectively.

The product of two types is a type of pairs, since, for example, if t is a type with three elements, then there are 2 * 3 = 6 different pairs containing a Bool and a t, that is, 6 elements of type Bool * t. For working with products of types, the ADT calculator enables pair syntax (1, "Hi!") as well as the projection functions fst : ∀ a b. (a * b) -> a and snd : ∀ a b. (a * b) -> b.

The sum of two types is a type with two options; for example, a value of type Bool + t is either a Bool value or a t value, and there are 2 + 3 == 5 such values. For working with sums of types, the ADT calculator provides the injection functions inl : ∀ a b. a -> (a + b) and inr : ∀ a b. b -> (a + b), as well as the case analysis function case : ∀ a b c. (a + b) -> (a -> c) -> (b -> c) -> c. For example, case (inl 3) (\x. 2 * x) (\y. 3 * y) == 6, and case (inr 3) (\x. 2 * x) (\y. 3 * y) == 9.

Elmer's glue

  • Char: g
  • Properties: Pickable
  • Capabilities: concat

Polyvinyl acetate. Popular adhesive for crafting. Of dubious nutritional value.

Facilitates the concatenation of text values.

The infix operator ++ : Text -> Text -> Text can be used to concatenate two Text values. For example,

let numWidgets = 42 in "Number of widgets: " ++ format numWidgets

GPS receiver

  • Char: G
  • Properties: Pickable
  • Capabilities: senseloc

A GPS receiver triangulates your current (x,y) coordinates from some convenient satellite signals, enabling the command whereami : Cmd (Int * Int).

I/O cable

  • Char: Ю
  • Properties: Pickable

An I/O cable can be used to communicate with adjacent actors.

LaTeX

  • Char: $
  • Properties: Pickable, Growable

A naturally occurring substance derived from trees, useful for producing rubber and for typesetting mathematical documents.

Linux

  • Char: L
  • Properties: Pickable

A copy of the Linux operating system.

PhD thesis

  • Char: P
  • Properties: Pickable

Perhaps writing one of these will help gain the trust and respect of the native inhabitants.

antenna

  • Char: Y
  • Properties: Pickable
  • Capabilities: meet

A device for transforming electric current into radio waves, and vice versa. Antennas can be used to increase the viable range over which you can communicate with your robots.

Antennas can also be used to locate nearby actors, by bouncing radio waves off them and listening for the echo. This capability can be accessed via two commands:

meet : Cmd (Unit + Actor) tries to locate a nearby actor (a robot, or... something else?) up to one cell away. It returns a reference to the nearest actor, or a unit value if none are found.

meetall : Cmd (rec l. Unit + (Actor * l)) returns a list of all the nearby actors other than oneself.

ash

  • Char: #
  • Properties: Pickable

Burned-out remnants of combustion.

atomic vector plotter

  • Char: A
  • Properties: Pickable

A plot device for plotting interstellar and intermolecular atomic vector gradients.

beaglepuss

  • Char: B
  • Properties: Pickable
  • Capabilities: appear

Iconic novelty disguise. Renders one either completely inconspicuous, or the opposite.

big furnace

  • Char: #
  • Properties: Pickable

A big furnace can get even hotter than a normal furnace, and can be used to process quartz into silicon.

big motor

  • Char: M
  • Properties: Pickable

A motor is useful for making devices that can turn when electric current is applied.

This one is huge and could be used to construct powerful machinery.

binoculars

  • Char: B
  • Properties: Pickable
  • Capabilities: recondir

Allows one to scout for other robots

bit (0)

  • Char: 0
  • Properties: Pickable, Growable

A bit is used to represent the smallest possible amount of information. Useful for constructing various information-processing devices, as well as drills.

bit (1)

  • Char: 1
  • Properties: Pickable, Growable

A bit is used to represent the smallest possible amount of information. Useful for constructing various information-processing devices, as well as drills.

bitcoin

  • Char:
  • Properties: Pickable
  • Capabilities: random

A beautiful round shaped piece of metal that seems to be of great value to the aliens on this planet.

Just like the bit it has two sides and when you flip it, it lands perfectly randomly on one of the sides.

blueprint

  • Char: B
  • Properties: Pickable
  • Capabilities: structure

This enables the structure and floorplan commands to locate and analyze structures placed in the world.

structure : Text -> Int -> Cmd (Unit + (Int * (Int * Int)))

Gets the x, y coordinates of the southwest corner of a constructed structure, by name and index.

floorplan : Text -> Cmd (Int * Int)

Gets the dimensions of a structure template.

board

  • Char: w
  • Properties: Pickable, Combustible

A wooden board, made by cutting a log into pieces.

boat

  • Char: B
  • Properties: Pickable
  • Capabilities: float

A robot with a boat equipped can float on top of water without drowning.

NOTE: most devices are automatically equipped on robots that will require them; but this doesn't work in the case of boats since floating is not associated with any particular command. To manually ensure a boat is equipped on a robot, just add the special command require "boat" to the robot's program.

boulder

  • Char: @
  • Properties: Unwalkable

A very large, impassable rock. A drill can be used to get rid of it and turn it into smaller rocks.

box

  • Char:
  • Properties: Pickable

A wooden box. It can hold things or be used as housing for other devices.

branch

  • Char: y
  • Properties: Pickable

A branch cut from a tree. It's as if the tree had to make a decision and was exploring two options.

branch predictor

  • Char: y
  • Properties: Pickable
  • Capabilities: cond

A branch predictor is a device which allows a robot to interpret conditional expressions. The syntax for a conditional expression is if followed by three arguments: a boolean test and then two delayed expressions (i.e. expressions in curly braces) of the same type.

Example:

let x = 2 in if (x > 3) {move} {turn right; move}

calculator

  • Char: +
  • Properties: Pickable
  • Capabilities: arith

A calculator allows a robot to do basic arithmetic calculations: addition, subtraction, multiplication, division, and exponentiation.

caliper

  • Char: C
  • Properties: Pickable
  • Capabilities: charcount

Simple, yet accurate measuring device. Can determine the length of a text value.

chars : Text -> Int

computes the number of characters in a Text value.

camera

  • Char: @
  • Properties: Pickable

A camera is a device for capturing images.

circuit

  • Char: #
  • Properties: Pickable

A circuit is needed for constructing various "smart" devices.

clock

  • Char: 0
  • Properties: Pickable
  • Capabilities: timeabs, timerel

A clock is a device for keeping track of time. It enables the wait and time commands.

time : Cmd Int returns the current time, measured in game ticks since the beginning of the game.

wait : Int -> Cmd Unit causes a robot to sleep for a specified amount of time (measured in game ticks).

comparator

  • Char: >
  • Properties: Pickable
  • Capabilities: compare

A comparator allows comparing two values to see whether the first is less, equal, or greater than the second.

Valid comparison operators are <, <=, >, >=, ==, and !=.

compass

  • Char: N
  • Properties: Pickable
  • Capabilities: orient

A compass gives a robot the ability to orient using the cardinal directions north, south, west, and east. For example:

turn west; move; turn north

It also enables the heading : Cmd Dir command, which returns the robot's current heading. For example, the following code moves east and then restores the same heading as before:

d <- heading; turn east; move; turn d

copper mine

  • Char: Å

A copper vein that can be actively mined to produce copper ore.

copper ore

  • Char: C
  • Properties: Pickable

Raw copper ore, useful for making wires, pipes, and other metal things. Patches of copper ore can be found on the surface, but are quickly exhausted.

Scanners seem to indicate larger quantities of copper could be found beneath some of the mountains, but those would require a drill to access and mine.

copper pipe

  • Char: I
  • Properties: Pickable

A pipe made out of a thin sheet of copper. Great for transmitting water or steam.

copper wire

  • Char: |
  • Properties: Pickable

Copper wire is very good at conducting electricity and useful for making various types of circuits and machines.

cotton

  • Char: i
  • Properties: Pickable, Growable, Combustible

A plant with tufts of soft fibers that can be harvested and used to make things, including sheets of material that the local aliens like to drape over their bodies.

counter

  • Char: C
  • Properties: Pickable
  • Capabilities: count

A counter enables the command count : Text -> Cmd Int, which counts how many occurrences of an entity are currently in the inventory. This is an upgraded version of the has command, which returns a Bool instead of an Int and does not require any special device.

cup of tea

  • Char: u
  • Properties: Pickable

A nice hot cup of tea.

curry

  • Char: C
  • Properties: Pickable

Delicious curry cooked from wild lambdas.

decoder ring

  • Char: O
  • Properties: Pickable
  • Capabilities: code

A handy lookup table for converting from characters to numeric codes and back, shaped for some reason into a ring. When equipped, it enables two functions:

charat : Int -> Text -> Int returns the numeric code of the character at a specific index in a (0-indexed) Text value.

tochar : Int -> Text creates a singleton (length-1) Text value containing a character with the given numeric code.

deep mine

  • Char: Å

A deep mine that yields rare and wonderful treasures to those who are patient.

But be careful lest you delve too greedily and too deep.

detonator

  • Char: *
  • Properties: Pickable
  • Capabilities: selfdestruct

An explosive device which can be used to self-destruct, via the selfdestruct command. Immediately vaporizes the robot and any inventory it is carrying. Can be useful, say, if you are sending out some exploratory robots and don't want them cluttering up the world once they are done.

dictionary

  • Char: D
  • Properties: Pickable
  • Capabilities: env

A dictionary allows a robot to remember definitions and reuse them later. You can access this ability with either a def command, which creates a name for an expression or command that is available from then on, or with a let expression, which names an expression or command locally within another expression.

def m2: Cmd Unit = move; move end
let x: Int = 3 in x ^ 2 + 2 * x + 1

The type annotations in def are optional.

down and horizontal wall

  • Char:
  • Properties: Unwalkable, Known

A down and horizontal wall.

dozer blade

  • Char: /
  • Properties: Pickable
  • Capabilities: push

A broad, sturdy surface that can be attached to a robot and used to push objects.

push : Cmd Unit will advance the robot and the entity in front of it forward by one step.

drill

  • Char: !
  • Properties: Pickable
  • Capabilities: drill

A drill allows robots to drill through rocks and mountains (with e.g. drill forward), and extract resources from mines (with drill down).

drill bit

  • Char: !
  • Properties: Pickable

A drill bit is the most important component of a drill, and must be made out of two bits of opposite parity, for strength.

fast grabber

  • Char:
  • Properties: Pickable
  • Capabilities: grab, place, give, atomic, swap

A fast grabber is an improved version of the basic grabber - not only can it grab, place, and give, it can also swap.

The swap command allows the robot to execute grab and place at the same time so that the location where the robot is standing does not become empty.

You can use this to prevent failures where multiple robots are trying to grab, place or scan a given location.

In addition you retain the capability to use the atomic command, with which you can implement other commands that are safe when run in parallel.

flash memory

  • Char: §
  • Properties: Pickable
  • Capabilities: reprogram

A compact, non-volatile memory device, capable of storing up to 8 pZ of data.

Flash memory can be used as a component of other devices. In addition, a flash memory device can be used to reprogram other robots using the reprogram command.

The robot being reprogrammed must be idle, and must possess enough capabilities to run the new command; otherwise reprogramming will fail.

flower

  • Char: *
  • Properties: Pickable, Growable

A beautiful flower that grows wild in local meadows. It is not clear what it might be useful for, but it looks nice.

furnace

  • Char: #
  • Properties: Pickable

A furnace can be used to turn metal ore into various useful products.

glass

  • Char:
  • Properties: Pickable

A pane of a brittle, clear substance, made from melting sand in a furnace.

gold

  • Char:
  • Properties: Pickable

A shiny, metallic substance, with applications in specialized electronics.

It also seems to be highly valued by local aliens.

gold coin

  • Char: ©
  • Properties: Pickable

A small round shaped piece of gold metal that the aliens pass between each other occasionaly.

Besides staying shiny it does not appear to have practical use.

grabber

  • Char: <
  • Properties: Pickable
  • Capabilities: grab, place, give

A grabber arm is an all-purpose, hydraulically controlled device that can manipulate other items and robots via the grab, place, and give commands.

The grab command takes no arguments; it simply grabs whatever is available, and also returns the name of the grabbed thing as a string. It raises an exception if run in a cell that does not contain an item.

The place command takes one argument, the name of the item to place. The item is removed from the robot's inventory and placed in the robot's current cell (which must be empty). Raises an exception if the operation fails.

The give command takes two arguments: the Actor to give an item to (which can be at most 1 cell away), and the name of the item to give. Raises an exception if the operation fails.

halting oracle

  • Char: ?
  • Properties: Pickable
  • Capabilities: halt

A device to solve the halting problem. When asked if a particular robot program will halt, it always answers YES. And it is always correct... or else!

Enables the command halt : Actor -> Cmd Unit which takes a robot as an argument and, if it is up to one cell away, cancels its currently running program (if any). In creative mode, there is no distance limitation.

handle

  • Char: h
  • Properties: Pickable
  • Capabilities: setname

Ergonomic affordance for manipulating objects. Also grants the "setname" capability, allowing one to assign a "handle" to robots.

harvester

  • Char:
  • Properties: Pickable
  • Capabilities: grab, harvest, place

A harvester can be used via the harvest command, which is almost identical to the grab command. The big difference is that some entities, when harvested instead of grabbed, leave behind a seed which will eventually grow into another copy of the original entity.

For entities which do not grow, harvest behaves exactly the same as grab.

hearing aid

  • Char: @
  • Properties: Pickable
  • Capabilities: listen

Allows a robot to hear anything being said nearby.

Simply having this device equipped will automatically add messages said by nearby actors to this robot's log, assuming it has a logger equipped.

That way you can view any heard message later either in the logger or the message window.

To wait for a message and get the string value, use:

l <- listen;
log $ "I have waited for someone to say " ++ l

horizontal wall

  • Char:
  • Properties: Unwalkable, Known

A horizontal wall.

hourglass

  • Char: 8
  • Properties: Pickable
  • Capabilities: timerel

An hourglass can measure the relative passage of time. It enables the wait command.

wait : Int -> Cmd Unit causes a robot to sleep for a specified amount of time (measured in game ticks).

hyperloop

  • Char:
  • Properties: Pickable
  • Capabilities: arith, sum, prod, rectype

Is it a calculator with a strange antenna? A strange loop with a built-in calculator? Who can say? A hyperloop gives you the ability to create recursive types: the type rec t. T(t) (where T(t) is some type containing t) is the type t such that t = T(t). For exmple, rec l. Unit + Int * l is the type of lists of integers.

infinite improbability drive

  • Char: I
  • Properties: Pickable
  • Capabilities: teleport

Enables the teleport command, which takes as arguments an Actor and a location in the form of a pair of coordinates, and teleports the given actor to the specified coordinates (and may also have some improbable side effects).

iron gear

  • Char: *
  • Properties: Pickable

An iron gear, suitable for constructing larger, more powerful machinery than a wooden gear.

iron mine

  • Char: Å

An iron vein that can be actively mined to produce iron ore.

iron ore

  • Char: F
  • Properties: Pickable

Raw iron ore. Used to create more resilient tools than copper.

It can only be mined by drilling in the mountains.

iron plate

  • Char:
  • Properties: Pickable

Worked iron suitable for crafting resilient tools.

It also possess some electro-magnetic properties.

key

  • Char: k
  • Properties: Pickable

A versatile item, with uses such as opening locked doors, entering input, and retrieving stored values.

keyboard

  • Char: K
  • Properties: Pickable
  • Capabilities: handleinput

A small device with multiple keys, adapted for your unique anatomy.

installkeyhandler : Text -> (Key -> Cmd Unit) -> Cmd Unit installs a custom handler function that can be activated to respond to keyboard inputs typed at the REPL.

key : Text -> Key constructs values of type Key, for example key "Down" or key "C-S-x".

lambda

  • Char: λ
  • Properties: Pickable, Growable
  • Capabilities: lambda

A wild lambda. They are somewhat rare, but regrow when picked. Lambdas are delicious when cooked into curry.

Lambdas can also be used to create functions. For example,

def thrice: Cmd Unit -> Cmd Unit = \c. c; c; c end

defines the function thrice which repeats a command three times.

left and vertical wall

  • Char:
  • Properties: Unwalkable, Known

A left and vertical wall.

lens

  • Char: O
  • Properties: Pickable

A polished, rounded piece of glass, capable of focusing rays of light.

life support system

  • Char: Ж
  • Properties: Pickable

A state-of-the-art life support system which maintains the particular temperature and mixture of gases you need to survive. It uses a sophisticated recirculating system and can run pretty much indefinitely. Unfortunately, the atmosphere outside is severely toxic (why do the inhabitants of this planet need so much nitrogen!?), so you'll have to stay inside for now.

linotype

  • Char: t
  • Properties: Pickable
  • Capabilities: format

Employs hot lead typesetting to arrange glyphs into a mold for printing.

An equipped linotype device enables the format command:

format : ∀ a. a -> Text

which can turn any value into a suitable text representation.

lodestone

  • Char: o
  • Properties: Pickable
  • Capabilities: negation

A medium-sized rock... that looks a little different. It seems to react to iron and surprisingly also to naturally growing bits.

log

  • Char: l
  • Properties: Pickable, Combustible

A wooden log, obtained by harvesting a tree and cutting off its branches.

logger

  • Char: l
  • Properties: Pickable
  • Capabilities: log

Allows a robot to generate and store messages for later viewing, using the log command, which takes a string. Log messages are also automatically generated by uncaught exceptions.

lower left corner

  • Char:
  • Properties: Unwalkable, Known

A lower left corner wall.

lower right corner

  • Char:
  • Properties: Unwalkable, Known

A lower right corner wall.

metal drill

  • Char: !
  • Properties: Pickable
  • Capabilities: drill

A metal drill allows robots to drill through rocks and mountains, and extract resources from mines, faster than a regular drill.

A metal drill is also able to drill deeper than a regular drill. Thus, some resources are only reachable using a metal drill.

mirror

  • Char: U
  • Properties: Pickable
  • Capabilities: whoami

With a mirror, robots can reflect on themselves and see their own name.

A mirror enables the whoami command, which returns the robot's name as a string.

It also enables the special self variable, which gives a robot a reference to itself.

mithril

  • Char: M
  • Properties: Pickable

Mithril can be beaten like copper, and polished like glass. One can also make of it a metal, light and yet harder than tempered steel. Its beauty is like to that of common silver, but the beauty of mithril does not tarnish or grow dim.

mountain

  • Char: A
  • Properties: Unwalkable, Opaque

A mountain. Can be tunneled through with a drill, but it takes time.

mountain tunnel

  • Char: Å

A tunnel in a mountain through which anything can freely move.

net

  • Char: #
  • Properties: Pickable
  • Capabilities: try

A net is a device woven out of many strings. With a net equipped, you can use the try command to catch errors. For example

try {move} {turn left}

will attempt to move, but if that fails, turn left instead.

olfactometer

  • Char: N
  • Properties: Pickable
  • Capabilities: detectdistance

An electronic "nose" that can tell how far away something is.

sniff : Text -> Cmd Int returns the distance to the nearest specified entity.

paper

  • Char:
  • Properties: Pickable, Combustible

A flat material made of pressed and dried wood fibers, used as a surface on which to inscribe symbols.

pixel (B)

  • Char: .
  • Properties: Pickable, Growable

A tiny picture element, used either to emit or detect blue light.

pixel (G)

  • Char: .
  • Properties: Pickable, Growable

A tiny picture element, used either to emit or detect green light.

pixel (R)

  • Char: .
  • Properties: Pickable, Growable

A tiny picture element, used either to emit or detect red light.

quantum dot

  • Char: .
  • Properties: Pickable

A nanoscale semiconductor particle with a wide range of applications.

quartz

  • Char: Q
  • Properties: Pickable

Raw quartz crystals. Useful for creating devices like clocks, and can be processed to extract silicon.

It can only be mined by drilling in the mountains.

quartz mine

  • Char: Å

A quartz vein that can be actively mined to produce quartz.

right and vertical wall

  • Char:
  • Properties: Unwalkable, Known

A right and vertical wall.

rock

  • Char: o
  • Properties: Pickable

A medium-sized rock, picked up from the ground or created by drilling. Can be ground into sand or used to build a simple furnace, among other things.

rolex

  • Char: R
  • Properties: Pickable
  • Capabilities: wakeself, timerel

Enables robots to use the watch and wait commands.

watch : Dir -> Cmd Unit will mark an adjacent (in the specified direction) location of interest to monitor for placement or removal of items. A subsequent call to wait will be interrupted upon a change to the location.

rubber

  • Char: %
  • Properties: Pickable

A flexible, durable material made from LaTeX.

rubber band

  • Char: O
  • Properties: Pickable
  • Capabilities: atomic

A rubber band can tie multiple commands together so that other robots can't execute commands in between them. It can be used via the atomic command. For example, suppose robot A executes the following code:

b <- ishere "rock";
if b {grab; return ()} {}

This seems like a safe way to execute grab only when there is a rock to grab. However, it is actually possible for the grab to fail, if some other robot B snatches the rock right after robot A sensed it and before robot A got around to grabbing it on the next game tick.

This will make robot A very sad and it will crash.

To prevent this situation, robot A can wrap the commands in atomic, like so:

atomic (b <- ishere "rock"; if b {grab; return ()} {})

sand

  • Char:
  • Properties: Pickable

A substance composed mostly of tiny rocks and mineral particles that can be used in a furnace to make glass. You can often find it near water, or make it yourself by grinding up rocks.

scanner

  • Char: $
  • Properties: Pickable
  • Capabilities: sensefront, sensehere, scan

With a scanner device, robots can use the scan command to learn about their surroundings. Simply give scan a direction in which to scan, and information about the scanned item (if any) will be added to the robot's inventory.

A scanner also enables blocked : Cmd Bool, which returns a boolean value indicating whether the robot's path is blocked (i.e. whether executing a move command would fail); ishere : Text -> Cmd Bool for checking whether the current cell contains a particular entity; and isempty : Cmd Bool for checking whether the current cell is empty of entities. Note that ishere and isempty do not detect robots, only entities.

Finally, robots can use the upload command to copy their accumulated knowledge to another nearby robot; for example, upload base.

silicon

  • Char: S
  • Properties: Pickable

Extracted by processing quartz at high temperatures, silicon can be used to construct integrated circuits.

silver

  • Char:
  • Properties: Pickable

A shiny, metallic substance, noted for its high reflectivity when polished.

small motor

  • Char: m
  • Properties: Pickable

A motor is useful for making devices that can turn when electric current is applied.

This one is rather small, but surprisingly efficient.

solar panel

  • Char: #
  • Properties: Pickable
  • Capabilities: power

An extremely efficient solar panel, capable of generating sufficient power from ambient starlight alone. A robot powered by one of these can operate any time, including on cloudy days and at night.

strange loop

  • Char: 8
  • Properties: Pickable
  • Capabilities: recursion

Two copper wires twisted together in a strange shape that loops back on itself. It must be useful for something...

string

  • Char: ~
  • Properties: Pickable
  • Capabilities: format, concat, split, charcount

A long, flexible device for transferring either force or information, made of twisted cotton fibers. Multiple strings can also be woven into larger configurations such as cloth or nets.

An equipped string device enables several commands for working with Text values:

format : ∀ a. a -> Text can turn any value into a suitable text representation.

The infix operator ++ : Text -> Text -> Text can be used to concatenate two text values. For example,

let numWidgets = 42 in "Number of widgets: " ++ format numWidgets

chars : Text -> Int computes the number of characters in a Text value.

split : Int -> Text -> (Text * Text) splits a Text value into two pieces, one before the given index and one after.

tank treads

  • Char: %
  • Properties: Pickable
  • Capabilities: move, moveheavy, turn

Tank treads work like treads, but are large enough to move even heavy robots around.

tape drive

  • Char: %
  • Properties: Pickable
  • Capabilities: backup

A tape drive allows you to backup; that is, to drive in reverse.

tea leaves

  • Char: l
  • Properties: Pickable

Leaves picked from a tea plant. They give off a nice smell when crushed.

tea plant

  • Char: t
  • Properties: Pickable, Growable

Camellia sinensis.

teeter-totter

  • Char: /
  • Properties: Pickable

A rotating board apparently popular with young aliens. Perhaps it could also be used as a primitive balance scale.

toolkit

  • Char: Ѣ
  • Properties: Pickable
  • Capabilities: salvage

A toolkit can be used, via the salvage command, to take apart old robots.

salvage takes no arguments. It looks for an inactive robot (one which is not currently running a program) in the current cell. If an inactive robot is found, its log (if any) is downloaded and it is dismantled, transferring its knowledge, devices, and inventory to the robot running salvage. If no inactive robots are found in the current cell, salvage does nothing.

treads

  • Char: %
  • Properties: Pickable
  • Capabilities: move, turn

Equipping treads on a robot allows it to move and turn.

The move command moves the robot forward one unit.

For example to move two units:

move; move

The turn command takes a direction as an argument, which can be either absolute (north, west, east, south) or relative (left, right, forward, back, down).

Example:

move; turn left; move; turn right

tree

  • Char: T
  • Properties: Pickable, Opaque, Growable, Combustible

A tall, living entity made of a tough cellular material called "wood". They regrow after being harvested and are an important raw ingredient used in making many different devices.

tweezers

  • Char: V
  • Properties: Pickable
  • Capabilities: debug

Sometimes small, self-reproducing creatures get stuck inside a robot's relays, preventing it from executing properly. Tweezers are useful for removing such pests, and for inspecting robots' detailed inner workings.

typewriter

  • Char: Д
  • Properties: Pickable

A typewriter is used to inscribe symbols on paper, thus reifying pure, platonic information into a physical form.

up and horizontal wall

  • Char:
  • Properties: Unwalkable, Known

A up and horizontal wall.

upper left corner

  • Char:
  • Properties: Unwalkable, Known

Upper left corner.

upper right corner

  • Char:
  • Properties: Unwalkable, Known

An upper right corner wall.

vertical wall

  • Char:
  • Properties: Unwalkable, Known

A vertical wall.

victrola

  • Char: Q
  • Properties: Pickable
  • Capabilities: record

A device for reading and writing data on circular platters made of a soft plastic material. The stylus must be made of a hard and durable material, with a special tip that relies on quantum effects to extract high-density information.

Also allows manipulating composite values consisting of a collection of named fields. For example, [x = 2, y = "hi"] is a value of type [x : Int, y : Text]. Individual fields can be projected using dot notation. For example, let r = [x = 2, y = "hi"] in r.x has the value 2. The order of the fields does not matter.

water

  • Char:
  • Properties: Pickable, Infinite, Liquid

Liquid dihydrogen monoxide, which seems to be plentiful on this planet.

wavy water

  • Char: ~
  • Properties: Pickable, Infinite, Liquid

A wavy section of water. The same as normal water, but with more waves.

wedge

  • Char: v
  • Properties: Pickable
  • Capabilities: split

A simple machine for the textually-inclined; plain but effective.

An equipped wedge enables the split command:

split : Int -> Text -> (Text * Text)

splits a Text value into two pieces, one before the given index and one after.

welder

  • Char: f
  • Properties: Pickable
  • Capabilities: equip, unequip

A welder can be used to affix other gadgets to one's robot, providing the equip and unequip commands.

The equip command takes one argument: the name of the device to equip. Raises an exception if the device is not in your inventory.

The unequip command takes one argument: the name of the device to unequip. Raises an exception if the device is not equipped.

wooden gear

  • Char: *
  • Properties: Pickable

A wooden gear. Not quite as strong or versatile as an iron gear, but easy to produce.

workbench

  • Char: π
  • Properties: Pickable
  • Capabilities: make

A plain wooden workbench, providing space to make other things using the make command.

Example:

make "log"
Clone this wiki locally