ICFP Programming Contest 2019 Report

Ilya Sergey
https://icfpcontest2019.github.io

ICFP Programming Contests•

Annual contest, running since 1998•

Goes for 72 hours (long weekend), usually with a 24 hour lightning division•

Modest cash prizes but unlimited bragging rights••

Language X is the programming tool of choice for discriminating hackers•

Language X is a fine programming tool for many applications•

Language X is very suitable for rapid prototyping•

Team Z are an extremely cool bunch of hackers

Each year the contest is organised by a different group of FP hackers

Recent History•

2012: Mining lambdas from caves in Scotland•

2013: Program synthesis•

2014: Programming Pac LambdaMan•

2015: Hexagonal Tetris with secret words•

2016: Origami folding•

2017: Lambda-punting•

2018: 3D constructions (and destructions) using nano-bots

ICFP 2017
Hey, would you like to jumpat the one-in-a lifetime opportunity
to run the ICFP ProgrammingContest in 2019?

Sure, sounds like a lot of fun!

ICFP 2019 General ChairICFP 2017
Hey, would you like to jumpat the one-in-a lifetime opportunity
to run the ICFP ProgrammingContest in 2019?

ICFP 2018
Yay, I’ll be running the ICFP
Programming Contest
next year!

ICFP Programming Contest 2019

By 2019 Functional Programminghas taken over the WorldBy 2019 Functional Programminghas taken over the World•

2012: Mining lambdas from caves in Scotland•

2013: Program synthesis•

2014: Programming Pac LambdaMan•

2015: Hexagonal Tetris with secret words•

2016: Origami folding•

2017: Lambda-punting•

2018: 3D constructions (and destructions) using nano-bots

By 2019 Functional Programminghas taken over the World•

2012: Mining lambdas from caves in Scotland•

2013: Program synthesis•

2014: Programming Pac LambdaMan•

2015: Hexagonal Tetris with secret words•

2016: Origami folding•

2017: Lambda-punting•

2018: 3D constructions (and destructions) using nano-bots

2.1

Mine layout

2012:
MininglambdasMineAlayoutmine is an n ⇥ m grid of cells, with the convention that (1, 1right. Each cell contains one of the following:
e is an n ⇥ m grid of cells,
withtheconvention
that
(1,
1)
is
t
MiningRobot(R
in
ASCII)
2.1 Mine layout

from caves in Scotland

Each cell contains one of the following:

A mine is an n ⇥ m grid of cells, with the convention that (1, 1right. Each cell contains
one
the following:
Rock (*
in of
ASCII)
Mining Robot (R in ASCII)
ClosedLambdaLift(L
in
ASCII)
Mining Robot(R
in
ASCII)
Rock (* in ASCII)
Mining Robot (R in ASCII)
Earth (. in ASCII)
Rock (* inClosed
ASCII)
Lambda Lift (L in ASCII)
Rock ( in ASCII)

Wal

Lam

2017: Lambda-Punting

0 most of the code in the world will be written in functional languages using lambdas.
to the growing need for lambdas, in 2012 the ICFP contest participants have developed
1
for lifting this precious resource from mines in Scotland. Since then, lambdas haveted from mines all over the world, and in 2017, ICFP contestants came up with optimal
2ver lambdas to users via advanced punting strategies.
elerated mining and delivery of lambdas allowed us toost legacy code — the infamous bit rotting problem wasand for all. However, eliminating legacy code creates• What shall we do with all the legacy code?
em: how to dispose of all the bit-rotten software? A
en devised
to
store
it
in
the
empty
mines
the
lambdas• We need to dispose the bit-rotten software…
ally extracted from, which can now be converted intoe silos.• Let us use empty mines as waste silos!
ent bit rot from seeping into the soil, the mines, before
ned into silos, need to be insulated by wrapping theirce in a decay-containing substance. To perform thissts have designed robots called worker-wrappers. This year, we ask the ICFP commu-

2019: Bit Rotting Problem

explicitly speci�ed for each task. A map may contain a number of solid
e is encoded similarly to how the map is encoded. The obstacles do notboundary of the map, therefore, the worker-wrapper can reach any point
not occupied by an obstacle.
⇥ 10 map with two obstacles is shown in Figure 1. The boundary of thest of vertices [(0, 0), (10, 0), (10, 10), (0, 10)], while the obstacles are de�nedofcorrespondingly.
mines in a decay-containing substance.
, (6, 7), (4,Wrapping7)] and [(5, 8),the(6, 8),surface(6, 9), (5, 9)],Preventing Bit-Rot from Spreadingon and wrapping rules

pper model Wrappy-2019 (showned with three universal foldable
hat are attached to its body and alping. Each robotic manipulator canof surface within its reach. Oncea manipulator or the body of theconsidered wrapped. In order to
e, at each unit of time the workerne of the following actions:quare of the surface,

Worker-Wrapper 2019(aka Wrappy)

explicitly speci�ed for each task. A map may contain a number of solid
e is encoded similarly to how the map is encoded. The obstacles do notboundary of the map, therefore, the worker-wrapper can reach any point
not occupied by an obstacle.
⇥ 10 map with two obstacles is shown in Figure 1. The boundary of thest of vertices [(0, 0), (10, 0), (10, 10), (0, 10)], while the obstacles are de�ned
For
a
given
map,
give
a
Wrappy
trace
to
cover
the
entiresurface,, (6, 7), (4, 7)] and [(5, 8), (6, 8), (6, 9), (5, 9)], correspondingly.

The Task

while minimising a number of steps.

on and wrapping rules

pper model Wrappy-2019 (showned with three universal foldable
hat are attached to its body and alping. Each robotic manipulator canof surface within its reach. Oncea manipulator or the body of theconsidered wrapped. In order to
e, at each unit of time the workerne of the following actions:quare of the surface,The Rules•

Wrappy has three manipulators•

It can move in four directions(but not through the walls).

•

Wrappy can turn around•

Manipulators can fold an unfold in
narrow parts of a map.
DDDDDDDQWWWWWWWWEDDESSSSSSSAAAAAAEEWWWWWWDDAWWDASQAAAQSSSSSSS

Sounds too Easy?
Lambda-miners left some stuff behind…

Let’s see if we can use ity later point of time, with the e�ects described below. As of now, four kinds
discovered:

the Manipulator

Manipulator Extension

oster allows a worker-wrapper to peradditional manipulator, extending its
ew manipulator can be only attached-wrapper’s body or of any of the alulators. In order to do so, when using
location of the new manipulator posiposition of the worker-wrapper’s body)current position of the worker-wrapper is (x, ), and with its manipulators[(x, ), (x + 1, ), (x + 1, + 1), (x• +Wrappy1,1)], attach
a new manipulator
canbean an additional
ositions (1, 2), ( 1, 0), (2, 1), etc, but not at a position (3, 1) or (0, 0). Once a
robotic hand, extending its ranged, e.g., at (1, 2), the worker-wrapper can reach positions [(x, ), (x +1, ), (x +(x + 1, + 2)], and if another manipulator is then attached at ( 1, 0), it wills [(x 1, ), (x, ), (x + 1, ), (x + •1, Permanent+ 1), (x + 1, effect1), (x + 1, + 2)] Theying an extension is provided in Section 3.2.

the e�ects described below. As of now, four kinds

Manipulator Extension

apper to perextending its
nly attached
ny of the al, when using
pulator posiapper’s body)orker-wrapper is (x, ), and with its manipulators+ 1), (x• +Wrappy1,1)], attach
a new manipulator
canbean an additional), etc, but not at a position (3, 1) or (0, 0). Once a
robotic hand, extending its range-wrapper can reach positions [(x, ), (x +1, ), (x +her manipulator is then attached at ( 1, 0), it will), (x + •1, Permanent+ 1), (x + 1, effect1), (x + 1, + 2)] The
ded in Section 3.2.

sitions [(x 1, ), (x, ), (x + 1, ), (x + 1, + 1), (x + 1,
pecifying an extension is provided in Section 3.2.

1), (x + 1, + 2)] The

Fast Wheels

eels

oster temporarily speeds-up the workerg it to make two moves in the same direcft/right) in a single unit of time, assuming
oom to do so. If the there is a room for only
ance, the worker-wrapper is just one squarel), only one step will be performed. Unforeels also wear o� fast, and their e�ect onlys of time. Using a new pair of fast wheels
eady active extends the e�ect for up to additime (i.e., for the maximum of the remaining
eir sum) without increasing the speed any further.
• Wrappy moves twice as fast

when stepping in either direction•3

Effect lasts for 50 time units

1, ), (x + 1, + 1), (x + 1,
ovided in Section 3.2.

1), (x + 1, + 2)] The

Fast Wheels

p the workerthe same directime, assuming
a room for only
just one square
formed. Unforheir e�ect only
r of fast wheelst for up to addif the remaining
the speed any further.
• Wrappy moves twice as fast

when stepping in either direction•3

Effect lasts for 50 time units

2.3

Drill

Drill

ode: L�ect: Using a drill booster allows a worker-wrapper toove through obstacles and even walls of the mine, creatg tunnels of 1 square width. However, the drill cannot be
ed to move beyond the bounding box of the map (i.e., toe locations with coordinates that are negative or exceed theaximal X /Y -coordinate of the map’s vertices). Once started,e drill remains active for 30 units of time, after which itears o�. The e�ect of using a second drill with one alreadytivated follows the same rules as when using a second pair
fast wheels.
The drill booster can be used in combination with fastheels and vice versa.

2.4

Mysterious Point•

Wrappy can make tunnels inwalls and obstacles•

Effect lasts for 30 time units

ode: XDrills a worker-wrapper towalls of the mine, createver, the drill cannot bebox of the map (i.e., toe negative or exceed thes vertices). Once started,of time, after which it
nd drill with one alreadywhen using a second pairn combination with fast•

Wrappy can make tunnels inwalls and obstacles•

Effect lasts for 30 time units

of fast wheels.
The drill booster can be used in combination with fast
wheels and vice versa.

Mysterious Points

2.2.4

Mysterious Point

Code: XE�ect: The e�ect of this booster is currently unknown. Furthermore, it seems that it cannot becollected: the points on the map marked with this code contain some strange devices that are• The purpose is unknown (so far)�rmly mounted to the rock surface. Perhaps their purpose will become clear later.
2.2.5

Using boosters

.txt �le (brief directions for judges to build/run the solution; description
ach; feedback about the contest; self-nomination for judges’ prize; etc), amaterials. This can be done at:

Initial Task

https://icfpcontest2019.github.io/profile/ing•

150 maps with boosters of different kinds•

Solution is a zip-file with Wrappy traces (text files)

the betterscore scoreteam,TTheforshortera taskthe
T , traces,
for whicha valid solution is provided, is com⇠⇡
t bestscoreteam,T , 1000 ⇥ log2 (XT ⇥ YT ) ⇥,t team•nd YT are the maximal x/ -dimensions of T ’s map, t team is a number of tim
m’s solution, and t
is the minimum wrapping time among all teams’ coThe Maps

30 x 3050 x 50

The Maps

100 x 100

200 x 200

The Maps

ICFP 2016

100 x 100

200 x 200

More Maps

More Maps

Extensions

June 21, 2019, 5:00pm UTC

Teleports

A new pack of maps has been delivered to us, and we still need your help to navigate the workerwrapper. These new maps feature a new kind of booster, which might prove useful.
New booster: Teleports

7 hours into the contest

Code: RE�ect:• This booster uses cutting-edge technology to take control over the worker-wrapper’s
Wrappycansetupabeaconat
any
non-wallmovement in space, by using two commands: shift and reset. The reset command must be exeon a mapto spend the booster, permanently installing a teleport
cuted �rst;location
it requires a worker-wrapper
beacon at the present location of the worker-wrapper. Once this is done, the shift operation can be
invoked• fromany locationon the map,the coordinatesof the point
previously installed
It canteleport
to and,theprovided
beaconfrom any
teleport beacon, will immediately move the worker-wrapper back to the beacon location. Teleportation via shift takes one unit of time and can be performed an arbitrary number of times. One• Can do as many teleportations as necessary
can install as many teleports as one has boosters. New teleports cannot be created in locations
containing previously installed teleports or mysterious points (X).

June 21, 2019, 5:00pm UTC

Teleports

A new pack of maps has been delivered to us, and we still need your help to navigate the workerwrapper. These new maps feature a new kind of booster, which might prove useful.

New booster: Teleports

7 hours into the contest

Code: RE�ect:• This booster uses cutting-edge technology to take control over the worker-wrapper’s
Wrappycansetupabeaconat
any
non-wallmovement in space, by using two commands: shift and reset. The reset command must be exeon a mapto spend the booster, permanently installing a teleport
uted �rst;location
it requires a worker-wrapper
eacon at the present location of the worker-wrapper. Once this is done, the shift operation can be
nvoked• fromany locationon the map,the coordinatesof the point
previously installed
It canteleport
to and,theprovided
beaconfrom any
eleport beacon, will immediately move the worker-wrapper back to the beacon location. Teleporation via shift takes one unit of time and can be performed an arbitrary number of times. One• Can do as many teleportations as necessary
an install as many teleports as one has boosters. New teleports cannot be created in locations
ontaining previously installed teleports or mysterious points (X).

The sizes of the maps that need wrapping grow larger, and our worker-wrapper could use somehelp. This is made possible in a new pack of maps featuring a new kind of booster and revealing
the purpose of the mysterious points from the previous tasks.

ClonesNew booster: Cloning

14 hours into the contest

Code: CE�ect: With this booster, a worker-wrapper can replicate itself by creating a replica. Unfortu• theCan
createa cloneat oneofnot very mature, and the cloning booster
nately,supportfor the cloning
technology
is stillcan be only
in designatedpoints”
spawn points, marked on a map with the code X. A replica of atheused“mysteryworker-wrapper created this way acts independently of its original and may create more replicas
using•the cloning boosters, thus providing parallel wrapping speed-up. Boosters collected by any
Clonescandothewrapping
independently
replica are immediately available to use by any other worker-wrapper, with the e�ect applied tothe user only.
• Collectedboosters
aresharedbetweenalloneclonesSeveralworker-wrappers
may occupy
the samelocation.
Cloning takes
time unit, andthe created replica starts acting from the next turn from the location of the used spawn point. If
several worker-wrapper replicas exist concurrently, they make their steps in the same time unit,

Clones

The sizes of the maps that need wrapping grow larger, and our worker-wrapper could use somehelp. This is made possible in a new pack of maps featuring a new kind of booster and revealing
the purpose of the mysterious points from the previous tasks.
New booster: Cloning

14 hours into the contest

Code: CE�ect: With this booster, a worker-wrapper can replicate itself by creating a replica. Unfortu• theCan
createa cloneat oneofnot very mature, and the cloning booster
nately,supportfor the cloning
technology
is stillcan be only
in designatedpoints”
spawn points, marked on a map with the code X. A replica of atheused“mysteryworker-wrapper created this way acts independently of its original and may create more replicas
using•the cloning boosters, thus providing parallel wrapping speed-up. Boosters collected by any
Clonescandothewrapping
independently
replica are immediately available to use by any other worker-wrapper, with the e�ect applied tothe user only.
• Collectedboosters
aresharedbetweenalloneclonesSeveralworker-wrappers
may occupy
the samelocation.
Cloning takes
time unit, andthe created replica starts acting from the next turn from the location of the used spawn point. If

complete team information and submit a single .zip archive with their sot �le (brief directions for judges to build/run the solution; description oh; feedback about the contest; self-nomination for judges’ prize; etc), andaterials. This can be done at:ng

Extended Task

https://icfpcontest2019.github.io/profile/•

150 maps with boosters of different kinds•

Solution is a zip-file with Wrappy traces (text files)

core scoreteam,T•The
shorterthetraces,thebetterfor a task T , for which a valid solution is provided, is comp⇠⇡t bestscoreteam,T , 1000 ⇥ log2 (XT ⇥ YT ) ⇥,t teamd YT are the maximal x/ -dimensions of T ’s map, t team is a number of time ucomplete team information and submit a single .zip archive with their sot �le (brief directions for judges to build/run the solution; description oh; feedback about the contest; self-nomination for judges’ prize; etc), andaterials. This can be done at:ng

Extended Task

https://icfpcontest2019.github.io/profile/•150 300 maps with boosters of different kinds•

Solution is a zip-file with Wrappy traces (text files)

core scoreteam,T•The
shorterthetraces,thebetterfor a task T , for which a valid solution is provided, is comp⇠⇡t bestscoreteam,T , 1000 ⇥ log2 (XT ⇥ YT ) ⇥,t teamd YT are the maximal x/ -dimensions of T ’s map, t team is a number of time uMore Maps

200 x 200

400 x 400

Provided Infrastructure•

Solution is a zip-file with Wrappy traces (text files)• curl-F “private_id=34fbde"\-F "file=@solutions.zip" \https://monadic-lab.org/submit•

A JavaScript visualiser (running in the browser)•

Live Rankings (updated every five minutes)•

A very crappy reference solver (not released)And with that we finishedthe Lightning Division…

… but what kind of
ICFP Contest would that bewithout a twist?

it can reach positions [(x, ), (x + 1, ), (x + 1, + 1), (x + 1,1)], a new manipulator can be
ps, we have noticed some locations being marked.
2.2.3 Drill
vertices, therefore, de�nes
the boundary of a map that is located“on thewithrespect
attached
at left”
relative
positions(1,to2),the( 1, 0), (2, 1), etc, but not at a position (3, 1) or (0, 0). Once as, a number of useful artefacts — so-called boosters
manipulator is attached, e.g., at (1, 2), the worker-wrapper can reach positions [(x, ), (x +1, ), (x +direction induced by traversing
the list.
Code: Lns, lying on the The
�oor.bodyThese
bea used+ 1), (x1, map,1), and(x + its
1, current+ 2)], and if another manipulator is then attached at ( 1, 0), it willE�ect:can
Using
drill
booster aallows
worker-wrapperof aboosters
worker-wrapper
occupies1⇥1asquareon the1,tosurfaceof+themove through obstacles
even walls of the mine, creatient (and also
more fun).
A worker-wrapper
can andbe ablereach The
positions[(xposition
1, ), (x,of ), (x + 1, ), (x + 1, + 1), (x + 1,
1), (x + 1, + 2)] The
positionis describedasthecoordinatesofthesquare’sbottom-leftcorner.
initialing tunnels of 1 square width. However, the drill cannot be
exact format of specifying an extension is provided in Section 3.2.
tion containingit.
Oncecollected,
theboosterspeci�edcanthe bounding
the worker-wrapper is
explicitly
for each
A (i.e.,map
used
to move beyondbox oftask.
the map
to may contain a number of solid
the e�ects described
As ofthenow,
fourwithkinds
locationscoordinates
thattoare how
negativeor exceed
obstacles;below.
each obstacleis encodedsimilarly
themap theis encoded. The obstacles do notmaximal X /Y -coordinate of the map’s vertices). Once started,
2.2.2 Fast Wheels
touch each other or theof thetherefore,
thewhichworker-wrapper
can reach any point
the boundary
drill remains active
formap,30 unitsof time, afterit
Code: Fwears
The e�ect of
second drill with one alreadywithin the mine that isnoto�.occupied
byusingan aobstacle.
activated follows the same rules as when using a second pairE�ect:
This
booster
temporarily
speeds-up the workerAn example of a 10
⇥
10
map
with
two
obstacles
is
shown
in
Figure1.
Theboundaryoftheof fast wheels.
wrapper, allowing it to make two moves in the same direcmap is de�ned by the listTheofdrillvertices(10,in0),combination(10, 10), with
(0, 10)],
booster[(0,can 0),
be usedfast while the obstacles are de�nedtion (up/down/left/right) in a single unit of time, assuming
wheelsversa.
by the lists [(4, 2), (6, 2),(6, and7), vice(4, 7)]and [(5, 8), (6, 8), (6, 9), (5, 9)], correspondingly.

there is enough room to do so. If the there is a room for only
apper to per2.2.4 Mysterious Point
one step (for instance, the worker-wrapper isjust onesquareICFP
ProgrammingContest 2019
ICFP
ProgrammingContest2019
extending its2.1 Basic navigation and wrapping rules
away from a wall), only one step will be performed. UnforCode: X
only attached
Paralleltunately fast wheels also wear o� fast, and their e�ect
only Wrapping
TakingControlwith
Teleports
ny of the al-A standard worker-wrapper model Wrappy-2019 (shown
lasts for 50 units of time. Using a new pair of fast wheelsVersion 1.0
Versionthree
1.0
universal foldable
while a pair is already active extends the e�ect for up to addi, when usingon the right) is shipped withthat are attached to its body and altional 50 units of time (i.e., for the maximum of theremaining
ICFP
Programming Contest Organisers
pulator posi-robotic manipulators
ICFP Programming Contest Organisers
durations, not their sum) without increasing the speed any further.
low
it
to
perform
wrapping. Each robotic manipulator canapper’s body)
June 22, 2019, 0:00am UTC
wrap one 1 ⇥ 1 square
withinits reach. Once
Juneof21,surface
2019, 5:00pm
UTCE�ect:The e�ect of thisor
boosteriscurrently
unknown. Furthermore, it seems that it cannot beasquareistouchedbyamanipulator
the
body
of
the
orker-wrapper is (x, ), and with its
manipulators
collected:
the points on the map marked with this code contain some strange devices thatThearesizes of the maps that need wrapping grow larger, and our worker-wrapper could use someworker-wrapper,
it is�rmly
consideredwrapped.
In ordertopurpose will become clear later.
torock
surface.
+ 1),A(xnew+ pack1,1)], hasa newmanipulator
canbeof mapsbeen delivered
tomounted
us, and
wethe
still
need
your Perhaps
help to theirnavigate
the workerhelp. This is made possible in a new pack of maps featuring a new kind of booster and revealing
cover theentiresurface,atkindeach
unit oftimemight
theproveworkerwrapper.
maps feature
newofOncebooster,which
useful.
the purpose of the mysterious points from the previous tasks.
), etc, but
not These
at a newposition(3, 1) aor
(0,
0).
a
Using
wrapper can perform 2.2.5
one oftheboosters
following actions:3-wrapper can reach positions [(x, Using), (xeach+1,booster), (xtakes+ one time unit, during which the worker-wrapper cannot performNew
booster:
Cloning
another
New booster: Teleports• moveto anattachedadjacentaction.
oftheitthesurface,her manipulator
is thenatsquare( Once1, 0),
will
boosteris used, it is considered spent and cannot be used again.
Code: C
Code: R
• 1),
turnrelative), (x + 1, +(x90°,+ 1,changing
1), (xthe+ 1,+ 2)]position
The of its manipulators with respect to its body,
2.3 Rules of manipulator reachability•
donothing.
ded in Section 3.2.
Worker-wrapper’s manipulators are highly �exible, but have a limited reach, which should be
The initial con�gurationis always
the sameand isobstacles
described
by thesquarestakenofintothethe manipulators
account when calculating
the solution.
For instance,and cornersof the
block
them+
from
squares.
Accordingworker-wrapper
with coordinates [(x +mine
1, can), (x+ 1,1),reaching(x + 1,certain1)],
where(x, )toisthethe
location ofspeci�cathe worker-

the workere same direcme, assuming

tion, a square of surface can only be reached by a manipulator if its centre is visible from the centreof the square, corresponding to the location of the worker-wrapper’s body. A point is consideredvisible from another if it can be connected
2 by a straight segment without intersecting the sides ofwalls and obstacles (touching corners is allowed). Figure 2 shows an example of squares within
and outside the reach of a worker-wrapper with an extended set of manipulators.

E�ect: With this booster, a worker-wrapper can replicate itself by creating a replica. Unfortu-

it can reach positions [(x, ), (x + 1, ), (x + 1, + 1), (x + 1,1)], a new manipulator can be
ps, we have noticed some locations being marked.
2.2.3 Drill
vertices, therefore, de�nes
the boundary of a map that is located“on thewithrespect
attached
at left”
relative
positions(1,to2),the( 1, 0), (2, 1), etc, but not at a position (3, 1) or (0, 0). Once as, a number of useful artefacts — so-called boosters
manipulator is attached, e.g., at (1, 2), the worker-wrapper can reach positions [(x, ), (x +1, ), (x +direction induced by traversing
the list.
Code: Lns, lying on the The
�oor.bodyThese
bea used+ 1), (x1, map,1), and(x + its
1, current+ 2)], and if another manipulator is then attached at ( 1, 0), it willE�ect:can
Using
drill
booster aallows
worker-wrapperof aboosters
worker-wrapper
occupies1⇥1asquareon the1,tosurfaceof+themove through obstacles
even walls of the mine, creatient (and also
more fun).
A worker-wrapper
can andbe ablereach The
positions[(xposition
1, ), (x,of ), (x + 1, ), (x + 1, + 1), (x + 1,
1), (x + 1, + 2)] The
positionis describedasthecoordinatesofthesquare’sbottom-leftcorner.
initialing tunnels of 1 square width. However, the drill cannot be
exact format of specifying an extension is provided in Section 3.2.
tion containingit.
Oncecollected,
theboosterspeci�edcanthe bounding
the worker-wrapper is
explicitly
for each
A (i.e.,map
used
to move beyondbox oftask.
the map
to may contain a number of solid
the e�ects described
As ofthenow,
fourwithkinds
locationscoordinates
thattoare how
negativeor exceed
obstacles;below.
each obstacleis encodedsimilarly
themap theis encoded. The obstacles do not

700

maximal X /Y -coordinate of the map’s vertices). Once started,
2.2.2 Fast Wheels
touch each other or theof thetherefore,
thewhichworker-wrapper
can reach any point
the boundary
drill remains active
formap,30 unitsof time, afterit
Code: Fwears
The e�ect of
second drill with one alreadywithin the mine that isnoto�.occupied
byusingan aobstacle.
activated follows the same rules as when using a second pairE�ect:
This
booster
temporarily
speeds-up the workerAn example of a 10
⇥
10
map
with
two
obstacles
is
shown
in
Figure1.
Theboundaryoftheof fast wheels.
wrapper, allowing it to make two moves in the same direcmap is de�ned by the listTheofdrillvertices(10,in0),combination(10, 10), with
(0, 10)],
booster[(0,can 0),
be usedfast while the obstacles are de�nedtion (up/down/left/right) in a single unit of time, assuming
wheelsversa.
by the lists [(4, 2), (6, 2),(6, and7), vice(4, 7)]and [(5, 8), (6, 8), (6, 9), (5, 9)], correspondingly.

0
0
0

1

1300

tion, a square of surface can only be reached by a manipulator if its centre is visible from the centreof the square, corresponding to the location of the worker-wrapper’s body. A point is consideredvisible from another if it can be connected
2 by a straight segment without intersecting the sides ofwalls and obstacles (touching corners is allowed). Figure 2 shows an example of squares within
and outside the reach of a worker-wrapper with an extended set of manipulators.

0

the workere same direcme, assuming

30

there is enough room to do so. If the there is a room for only
apper to per2.2.4 Mysterious Point
one step (for instance, the worker-wrapper isjust onesquareICFP
ProgrammingContest 2019
ICFP
ProgrammingContest2019
extending its2.1 Basic navigation and wrapping rules
away from a wall), only one step will be performed. UnforCode: X
only attached
Paralleltunately fast wheels also wear o� fast, and their e�ect
only Wrapping
TakingControlwith
Teleports
ny of the al-A standard worker-wrapper model Wrappy-2019 (shown
lasts for 50 units of time. Using a new pair of fast wheelsVersion 1.0
Versionthree
1.0
universal foldable
while a pair is already active extends the e�ect for up to addi, when usingon the right) is shipped withthat are attached to its body and altional 50 units of time (i.e., for the maximum of theremaining
ICFP
Programming Contest Organisers
pulator posi-robotic manipulators
ICFP Programming Contest Organisers
durations, not their sum) without increasing the speed any further.
low
it
to
perform
wrapping. Each robotic manipulator canapper’s body)
June 22, 2019, 0:00am UTC
wrap one 1 ⇥ 1 square
withinits reach. Once
Juneof21,surface
2019, 5:00pm
UTCE�ect:The e�ect of thisor
boosteriscurrently
unknown. Furthermore, it seems that it cannot beasquareistouchedbyamanipulator
the
body
of
the
orker-wrapper is (x, ), and with its
manipulators
collected:
the points on the map marked with this code contain some strange devices thatThearesizes of the maps that need wrapping grow larger, and our worker-wrapper could use someworker-wrapper,
it is�rmly
consideredwrapped.
In ordertopurpose will become clear later.
torock
surface.
+ 1),A(xnew+ pack1,1)], hasa newmanipulator
canbeof mapsbeen delivered
tomounted
us, and
wethe
still
need
your Perhaps
help to theirnavigate
the workerhelp. This is made possible in a new pack of maps featuring a new kind of booster and revealing
cover theentiresurface,atkindeach
unit oftimemight
theproveworkerwrapper.
maps feature
newofOncebooster,which
useful.
the purpose of the mysterious points from the previous tasks.
), etc, but
not These
at a newposition(3, 1) aor
(0,
0).
a
Using
wrapper can perform 2.2.5
one oftheboosters
following actions:3-wrapper can reach positions [(x, Using), (xeach+1,booster), (xtakes+ one time unit, during which the worker-wrapper cannot performNew
booster:
Cloning
another
New booster: Teleports• moveto anattachedadjacentaction.
oftheitthesurface,her manipulator
is thenatsquare( Once1, 0),
will
boosteris used, it is considered spent and cannot be used again.
Code: C
Code: R
• 1),
turnrelative), (x + 1, +(x90°,+ 1,changing
1), (xthe+ 1,+ 2)]position
The of its manipulators with respect to its body,
2.3 Rules of manipulator reachability•
donothing.
ded in Section 3.2.
Worker-wrapper’s manipulators are highly �exible, but have a limited reach, which should be
The initial con�gurationis always
the sameand isobstacles
described
by thesquarestakenofintothethe manipulators
account when calculating
the solution.
For instance,and cornersof the
block
them+
from
squares.
Accordingworker-wrapper
with coordinates [(x +mine
1, can), (x+ 1,1),reaching(x + 1,certain1)],
where(x, )toisthethe
location ofspeci�cathe worker-

2000

E�ect: With this booster, a worker-wrapper can replicate itself by creating a replica. Unfortu-

ven in lambda-coins (LAM), the world’s
he characteristic feature of lambda-coin
ed consensus protoy. In the past, digitalintense mining proene�ts besides minting global warming.
better protocols thatut harming the environment.
ly versatile, can serve multiple purposes,

3 Lambda-Coins and the Contest Task Solutions

Lambda-Coin (LAM)

Teams can use lambda-coins earned by participating in the Lambda-chain protocol and accummulated on their wallets to purchase boosters, which can be used in solutions for the main contest
tasks. The prices for boosters are de�ned in the table at the beginning of this document.

3.1 Enhanced submission format•

Whenforsubmitting
solutionsinfor
contesttasks, a team protocol
has anAwardedparticipatingtheLambda-chain

option to include into their .zip-archive a number of �lesnamedprob-NNN.buy
forselectedproblems
NNN.
These
�les
• Lambda-chain mining is environmentally friendly
act as booster purchase descriptors and specify boosters theteam is willing to purchase to enhance their solutions for• By doing it, one helps to fight the Bit-Rot Problem
the corresponding tasks. A booster purchase descriptor issimply a series of (possibly repeating) booster codes, e.g.,
1• Poweredbyaconsensus
BBFFCCCLR. novel
The purchased
boostersprotocol
are assumed to be available from the very beginning of the worker-wrapper execution and, thus, can be used immediately.
The checker and visualiser for the contest solutions have been now updated to take optional(Also,
it’sananagramofMonadicLab).buy-�les. An example of a task solution relying on purchased boosters is also available:

Proof-of-Work

Proof-of-WrapProof-of-Wrap in a Nutshell•

Lambda-chain is a synchronous distributed (in fact, not) consensus protocol•

Initially, a genesis block is announced. It contains:(1) A map for wrapping (similar to a task from the main contest)+(2) A proof-of-wrap puzzle (new map specification)#nodes#boosters#points-in…

• For the next 15 minutes, the contest server expects solutions for the PoW block:(1) A solution for the wrapping task
(2) A new task (map) satisfying the specification in the puzzle• 100,000 LAM are split between the teams with top 25 best-ranked solutions for (1)• A contributed map (2) from one of the top 10 ranked teams is chosen

for the next round’s task (1)• This team is awarded additional 2,000 LAM and is banned for the next round• The cycle repeats with the new map and a new puzzle (generated by organisers)

The Essence•

To get awarded LAM, one has to solve current block’s task andpropose a map for the next block’s task•

The block reward (in LAM) is proportional to the quality of the solution•

If a team’s map is chosen as a task for the next block, it cannot
participate in the next round of mining, but gets an extra reward

Genesis Block Task

Rules for Contributed Maps•

Each block’s puzzle specifies parameters for the next block map proposal:•

Dimensions of the map•

A distribution of boosters in the puzzle•

A number of coordinates that should be within it•

A number of coordinates that should be outside of it, etc.

•

Suggested maps shouldn’t bee too sparse or too small (size condition)•

They also shouldn’t bee too boring or too heavyIn the past 24 hours, the ICFP contestants were very active on tping, drilling, teleporting, and other contest-related activities. This
commerce providers, and as a result the contest organisers’ mailbox
entitled “Best Deals on Your Wrapping Gear” and similarly. Out
some of these emails and indeed found quite interesting deals, which
contest participants:

Spending Lambda-coins•

A team can spend awarded LAM on boosters•

LAM can be spent multiple times in resubmissions•

Alternatively, LAM can be exchanged to scorepoints in the ration 1 to 1

Item
Manipulator
Fast Wheels
Drill
Teleport
Cloning

Price (LAM)
1000
300
700
1200
2000

In the table above, the prices for the boosters are given in lam
soon-to-be most popular and stable digital currency. The characte
is that it is powered by Lambda-chain — a novel distributed consens
col that has been designed to be environmentally-friendly. In the pa

Provided Infrastructure
for Lambda-coin Mining•

A Python script to submit block solutions•

Command-line block explorer•

Real-time monitoring of submitted solution•

Rankings with and without unspent LAM

Teleport
Cloning

1200
2000

s of the square’s bottom-left corner. The initial position of
�ed for each task. A map may contain a number of solid
milarly to how the map is encoded. The obstacles do note map, therefore, the worker-wrapper can reach any point
y an obstacle.
two obstacles is shown in Figure 1. The boundary of the, 0), (10, 0), (10, 10), (0, 10)], while the obstacles are de�nedd [(5, 8), (6, 8), (6, 9), (5, 9)], correspondingly.

The Contest

prices for the boosters are given in lambda-coins (LAM), the world’s
nd stable digital currency. The characteristic feature of lambda-coinping rules
bda-chain — a novel distributed consensus protoappy-2019 (shown
foldableouniversal
be environmentally-friendly.
In the past, digital
to its body and alntly
obtainedby the energy-intense mining protic
manipulator
canhin its reach. Once
k,
which
had
no
additionalbene�ts
besides
mintor the body of the
pped.
In
order
to
Earth’s
atmosphere,
accelerating
globalwarming.
f time the workering actions:mmunity
managed to devise better protocols that
rface,
olvingtimelyproblems
without
harmingtheenvironment.
on of its manipulators with respect to its body,ng mechanism, being extremely versatile, can serve multiple purposes,
ulators is always the same and is described by the squaresor(x us,hasbeen
up (usinga decentralised consensus mechanism),1),+ 1, it1)],
where(x, ) isset
the locationof the worker-

Statistics

Regular Contest•

194 registered teams•

105 complete profiles•

Lightning division••

774 submissions•

106 final submissions with non-zero scores

Main contest•

2745 submissions•

142 final submissions with non-zero scores•

CPU time spent grading: 25h 27m•

Average grading time: 33.37 sec

Countries (as in Profiles)
Japan
USA
RussiaGermany
UkraineFranceIndia
Australia
Denmark
PolandAustria
BahamasCanada

29
25
19
6
5
3
3
2
2
2
1
1
1

Switzerland
Colombia
United Kingdom
Indonesia
IcelandItaly
LatviaMalaysia
The Netherlands
New ZealandPortugal
Singapore
No Info

1
1
1
1
1
1
1
1
1
1
1
1
6

Pictures: team tech.kontur.ru

Picture credit: Niki Vazou

Teamsize
histogramTeams with N members
40
35
30
25
20
15
10
5
0
1

2

3

4

5

6

7

8

9

10

11

12

3

0
2
2

f#

3
2
2
1
1
1
1
1
1
1
1

sq
l
vu
e.
js

2

sh
el r
lsc
rip
sm t
t-l
ib

4

clo c
ju
re

5

ty lis ppe
co s c
m rip
m
t
on
l is
p
cr
ys
ta
l
ha
nd
po pe
w rl
er
sh
ell

5
5

sh

6

jav
a

6

go

7

sc
al
a

10
10

c#

15

c+
+
py
th
on
ru
st
ha
sk
ell
ba
jav s h
as
cr
ip
t
ru
by
ko
tli
n
oc
am
l

30
29
27

25

20

14
12
9

1
1

Submissions per hour of the contest
160

140

120

100

80

60

40

20

0
1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172

Lambda-chain Statistics•

31 hour of mining•

4177 puzzle solutions submitted•

3769 of them are valid (90.23%)•

121 block mined•

12,136,480 LAM awarded

Block submissions for each block
50
40
30
20
10
0
-10

0

20

40

60

80
total_subs

Slow adoption:
had to postpone mining for 10 hours

good_subs

100

120

Brave Early Adopters
•

Unagi

•

All your lambda are belong to us•

Sound! TypeSystem•

1kg cheese

Block submissions for each block
50
40
30
20
10
0
-10

0

20

40

60

80
total_subs

good_subs

100

120

Contributed Task Maps:
Expectations vs Reality

A possible proposal
for Block #40 taskAn actual proposal
for Block #40 taskAn actual proposal
for Block #40 task

Accepted proposal
for Block #40 task

Share of mined LAM!
PLASTIC
Rage
GoTeamPlowUltraForce5Fox1
StartedHydralisk
TheSide";getting_better_Samara
PolygonRobotics
Thekimiyuki+cannorin
Press
The
CREATE
BenPeteSmellyFeet
Camel
vodichka.kontur.ru
againstThe
HigherTuringO
TheWildLobsters
Guru
Effects
The
WORLD
Sons
noClassnoState
DrawingABlank
blueboar
Leptocephalus
Overfull
WINTERMUTE
GlitchesBones
LousyAttempt
Dis
Ty
Lone
lambda-llama
late,
10
Caml,
Invisible
Codingteam
Waterfall
TeamKieran
blueminer
hahadaertu
kstm.org
usakdsteen
Bottleinthecloset
DNIWE
Sauerkraut
Why
KatsuT0shi
tsunaudonFreecirimenjao
FLazy
Kita
gd-misfits
taxidriver
JunkFood
fruitsaladeatsjabber.ru
Gringenetentacles
uguu.org
dot
tomerun
AimTechudfewer
NCPLUGchyo
phocomyarunee
SampouKerminators
hayatoxtanzakunathanfsumorugoto
Veil
EinherjiPaaaaN
xiberfix
Functional
GOTO
trup16
udalov
to
VMI#1
tatsuoudfew
AlatarBegot
cobot
Meditation
Research
worshippers
srush
yowa
R22b
of
All
Slow
FIRQ
Meh
LILiK
tilde
Order
Research
TABLE
Machinists
d4o
but
ush
the
IQ1
Code
IKS
May
ts
pay
3Ward
cube
Tacos
Not?!
My
Evaluator
Yoshiko
DeliciousofIn(tech.kontur.ru)
kids!
pyos?
11
\hbox
worked
type
::
team
Imp
Vaea
10
respect
Caml
Model
Include...
aMoneyOffun();
Labs
checker
Zeuxis
Inc.
Taco
slow
-We
meant
THIRTEENoka
SkyrmionstouseHaskell
paiv

TBD
code-o-matic
Zebra cashto
InfusedHamsters
0%
0%
0%
0%
0%
0%
0%
0%
0%
LambdaSpice0%0%
uni 1%
1%1%0%
DiamondPrincess
1%1%
Olympia1%1%
Rotten Lambdas
2%
Raging Mushrooms

cw
2%
ichyo
2%

Unagi
6%

CowDay6%2%
Pigimarl
5%

NYCZRHTYO
2%
#31
2%

Sound! TypeSystem
5%

301
2%
tech.kontur.ru
4%

The Cat is #1!!
2%
sanma
3%

1kg cheese4%

fixstars3%

Lambding Snakes vs. Coding Monkeys
4%Sunspear
3%
The Blind Hen
3%2 Ivans3%



Gon the Fox
3%

All your lambda are belong to us
3%
Piggybank Software
Perpetuum Mobile
3%
Frictionless Bananas
3%
negainoido
Better than nothing
3%
3%
3%


4%

https://icfpcontest2019.github.io/profile/

HODLing or Spending?

ngWith additional
boosterscore scoreteam,T for a task T , for which a valid solution
is provided,
is comit’s easier to become the best!
⇠⇡
t bestscoreteam,T , 1000 ⇥ log2 (XT ⇥ YT ) ⇥,t teamd YT are the maximal x/ -dimensions of T ’s map, t team is a number of times solution,andt bestthe minimum
wrapping
time among all teams’ cor• UnspentLAM
areisadded
to the final scores(1 to 1)olutions.
Tasks
for
which
a
solutionisnotprovided
or
is
not
valid
yield
a
s
• Withan absolute score maximum 4,219,436 this is a substantial addition•

However, LAM spent wisely can reduce the scores of the competition!

ning Divisionhttps://public.flourish.studio/visualisation/602197/

Spending Lambda-coins•

Of 12,136,480 LAM mined…

•

10,047,700 LAM have been spent•

99.15% of them were spent on clones

Results

Lightning Division

Winner of the Lightning Division

Team
All your lambda are belong to usRafaël Bocquet
C++ and Haskell are very suitable for rapid prototyping.

$500 cash prizeTeam “All your lambda are belong to us”
Rafaël Bocquet

Two programming languages:
I C++ (Solver)
I Haskell (Scripts)
Three external solvers:
I aspino (Maximum satisfiability problem)
I LKH (Travelling salesman problem)
I Gurobi (Mixed-integer linear programming)Solution outline

Main idea: Without boosters and manipulators, the problem would be avariant of the Hamiltonian path problem.
Step 1 Collect boosters.
Step 2 Find a covering of the map by the robot shape.
Step 3 Find a Hamiltonian path in the induced graph.
Step 4 Insert rotations in the Hamiltonian path.
Step 5 Split the solution between clones.
Step 6 Local optimization (⇠ 10% improvement).

Solution outline

Main idea: Without boosters and manipulators, the problem would be avariant of the Hamiltonian path problem.
Step 1 Collect boosters. (LKH)
Step 2 Find a covering of the map by the robot shape. (aspino)
Step 3 Find a Hamiltonian path in the induced graph. (LKH)
Step 4 Insert rotations in the Hamiltonian path. (aspino)
Step 5 Split the solution between clones. (Gurobi)
Step 6 Local optimization (⇠ 10% improvement).

press Space to play video

Main Division

Judges’ Prize
for the most elegant use of the entire set of boosters

Team
Sound! TypeSystembakaming, chiro, fuqinho, gusmachine, nya3jp,
phoenixstarhiro, shunsakuraba, tanakh, yuizumi

Team Sound! Type System(using Rust, C++, Python, JavaScript, and Go)
is an extremely cool bunch of hackers.
$500 cash prizeSound! TypeSystem

Sound! TypeSystem: Members
bakaming

phoenixstarhiro

chiro

chunjpfuqinhotanakhgusmachine

yuizuminya3jpSound! TypeSystem: Overview
Wrappy Solvers

Puzzle Solvers

Infrastructure

tanakhgusmachine

autosubmitter

fuqinhofuqinhoautominer

manual solver

yuizumicloud validator

LAM Solver

cloud scheduler
dashboardbuyer
https://github.com/nya3jp/icfpc2019

Sound! TypeSystem: Main Solutions
Wrappy solver by tanakh● Written in Rust
● Based on BFS with plenty of hacky heuristics:
○
○
○
○
○
○

Give the first priority to cloning.
Give priority to filling small isolated areas to paint.
Get clones well spread out.
Manipulators are expanded to the left and right.
Use randomness to "improve" the score.
Some parameters were determined using simulated annealing.

Sound! TypeSystem: Main Solutions
Wrappy solver by fuqinho● Written in C++● Considers all cells within 5 steps not to be painted by another wrappy.
● Calculates the size of "islands" (isolated areas to paint) for each cell; thesmallest island takes the priority.
● Uses the beam search to determine the steps to cover the island and uses thenumber of painted cells, with heuristical weights (e.g. to give higher score toborders).

Sound! TypeSystem: Main Solutions

LAM solver by bakaming● Written in C++● Main solvers make solutions with several purchase patterns. LAM solver joinsthese solutions with earned LAM.
● We can solve this problem with dynamic programming as the number of LAM
and solution is very small.

Sound! TypeSystem: Puzzle Solvers
Puzzle solvers by yuizumi / gusmachine● Written in Python● Kept the logic simple to make it work before the original first round starts in 4
hours.
○○○Start from a vacant field,
build a wall from each oSqs until the wall reaches edges or other walls, andput bumps on walls to satisfy vMin vertices condition.

Second PrizeTeam
CowDayAkifumi Imanishi, Kohei Morita, Kohji Liu, Nozomu Nakajima,
Riku Kawasaki, Takuto Shigemura, Seiya Kamiya

C++ is a fine programming tool for many applications.

$500 cash prize

ICFP’19 Contest
Cowday Solution
Cowday TeamMembers
Infrastructure

Akifumi Imanishi

Algorithm

PuzzleCoordinator(???)

Riku Kawasaki

Kohei Morita

Kohji Liu

3 Students, 4 employees

Seiya Kamiya

Nozomu Nakajima

Takuto Shigemura

Algorithm-competition
Fanatics

Visualizationpress Space to playSolution
Preprocess• Assign weight to each cell, according
to the distance to an obstacle or abooster

Before filling area,
Collect Clone Items and Spawn• Visit nearest cloner/spawn point
greedilySolution
Basis:
greedy-ish approach• Enumerate all possible
next 5 steps and fix one
step which leads to thelargest weight in 5 steps,
iteratively
Cur
1
2
.
:

5 (Best)Only fix firstmove!

To use multiple robots
efficiently:• Each robot moves 100
turns at one time
This way, our robots are
asynchronous(!)

To avoid leaving small
areas unfilled:• If a move divides unfilledarea into separate
component, it tries fillingsmaller one first.

Misc

And our “equal” puzzle!

• To spend LAM, we always buy
Clones booster.
• Knapsack-like Dynamic
Programming algorithm in ourinternal judge• Do not use Drill or Teleporter• Try both using/not using Fast

Thank you organizers!

First PrizeTeam
Unagi
Takuya Akiba, Kentaro Imajo, Hiroaki Iwami,
Yoichi Iwata, Toshiki Kataoka, Naohiro Takahashi

Rust is the programming tool of choice for discriminating hackers.

$1000 cash prizeTeam Unagi

Takuya Akiba

Kentaro Imajo

Hiroaki Iwami

Preferred Networks

Preferred Networks

FLYWHEEL

Yoichi Iwata
National Institute of Informatics

Toshiki Kataoka Naohiro Takahashi
Preferred Networks

AtCoder• Left-hand rule
• Split single-

worker solution

Kataoka (Team Unagi)

Left-hand rule

• Wrap squares near walls• Repeat

Kataoka (Team Unagi)

Clone• Single-worker solution → multi-worker solution• Load balancing• Bootstrap: visit C, X, C, C, C, C, ...
• 1st replica stays at X

C (booster)and uses boosters immediately
X (spawn point)

Kataoka (Team Unagi)

Local refinement• Replace subsequence with shorter one• Use depth-first and breadth-first searches

Kataoka (Team Unagi)

Earn coins

Round 2Round 82

• Connect points• Add corners

Kataoka (Team Unagi)

Spend coins• Prepare solutions for buy settings:
[ ],
[B],
[C],
[C, B],[C, C],[C, C, C]• Solve a knapsack problem

Kataoka (Team Unagi)

prob-002,,29259,381
prob-002,B,50721,356
prob-002,C,59200,224
prob-002,CB,51232,226
prob-003,,34881,210
prob-003,B,52255,210
prob-003,C,47656,128
prob-003,CB,52766,128...

Kataoka (Team Unagi)

Language• Solvers (task, puzzle, buy)
are written in Rust
• Dashboard: Go•

Few lines of Shell script, JavaScript, Python

Kataoka (Team Unagi)

Figure 1: A map with two obstacles and a partial route of a worker-wrapper. The walls and solid
obstacles are shown in dark color. The position of the worker-wrapper’s body is depicted by a red
dot; dark yellow squares show the current reach of its manipulators, while the light yellow squares
show the parts of the surface that are already wrapped.

2 Maps and Worker-Wrapper Navigation
We have acquired a number of maps of mines that can be turned into silos for legacy code. Eachmap represents a single worker-wrapper task. The boundary of a map is encoded as a rectilinear
polygon, described by the list of its vertices with non-negative integer coordinates. The list ofvertices, therefore, de�nes the boundary of a map that is located “on the left” with respect to thedirection induced by traversing the list.
The body of a worker-wrapper occupies a 1⇥1 square on the surface of the map, and its current
position is described as the coordinates of the square’s bottom-left corner. The initial position of
the worker-wrapper is explicitly speci�ed for each task. A map may contain a number of solid
obstacles; each obstacle is encoded similarly to how the map is encoded. The obstacles do nottouch each other or the boundary of the map, therefore, the worker-wrapper can reach any point
within the mine that is not occupied by an obstacle.
An example of a 10 ⇥ 10 map with two obstacles is shown in Figure 1. The boundary of the
map is de�ned by the list of vertices [(0, 0), (10, 0), (10, 10), (0, 10)], while the obstacles are de�nedby the lists [(4, 2), (6, 2), (6, 7), (4, 7)] and [(5, 8), (6, 8), (6, 9), (5, 9)], correspondingly.

To Wrap Up

2.1 Basic navigation and wrapping rules
A standard worker-wrapper model Wrappy-2019 (shownon the right) is shipped with three universal foldable
robotic manipulators that are attached to its body and allow it to perform wrapping. Each robotic manipulator canwrap one 1 ⇥ 1 square of surface within its reach. Oncea square is touched by a manipulator or the body of theworker-wrapper, it is considered wrapped. In order tocover the entire surface, at each unit of time the workerwrapper can perform one of the following actions:• move to an adjacent square of the surface,• turn 90°, changing the relative position of its manipulators with respect to its body,• do nothing.

Contest Organisers
Ilya Sergey•

Contest idea, design, specification•

Problem instances•

Back-end grader•

Solution visualiser•

Social media and mailing list

Paramdeep Singh Raina•

Back-up server support

Contest Organisers
George Pîrlea
•Server-side programming•

Grading automation•

Rankings generation•

Data analysis•

Web-page

Contest Organisers
Lilia Anisimova•

Wrappy art

Past Contest Chairs

Sam Lindley
ICFP Contest 2017

Matthew Fluet
ICFP Contest 2018

Software and Tools•

Problem generation and back-end grader:••

Visualisation:••

Scala.js

Server-side scripting and data management:
•
•
•
•
•
•
•

•

Scala

Python 3
Flask
SQLiteCeleryRabbitMQAWS Elastic File System
AWS EC2

Web page:•

GitHub pages & Jekyll markdown

Sponsorserefore, the worker-wrapper can reach any pointcle.
acles is shown in Figure 1. The boundary of the), (10, 10), (0, 10)], while the obstacles are de�ned6, 8), (6, 9), (5, 9)], correspondingly.

Thanks to all contest participants!

es

19 (shown
foldabledy and alulator canch. Once
dy of theorder toe workers:

manipulators with respect to its body,

Good luck for
ICFP Contest 2020!