ilp-datasets / strings /README.md
andrewcropper's picture
Add files using upload-large-folder tool
1dbb54d verified
|
Raw
History Blame Contribute Delete
1.6 kB

String Transformations

Character-level string transformation tasks encoded as ILP problems. Each task requires learning a program that maps an input string to an output string, operating character-by-character.

Tasks: 329 tasks (in <task>/train/)

Head relation: out(Ex, Pos, Char) — position Pos in the output string of example Ex is character Char.

Background relations:

Relation Arity Description
in(Ex, Pos, Char) 3 Character Char at position Pos in the input string of example Ex
add(P1, P2, P3) 3 P3 = P1 + P2 (position arithmetic)
lt(P1, P2) 2 Position P1 is less than position P2
my_succ(P1, P2) 2 P2 is the immediate successor of P1 (i.e. P2 = P1 + 1)
width(Ex, W) 2 The input string of example Ex has width W
change_case(C1, C2) 2 C2 is the case-swapped version of C1
is_letter(C) 1 C is a letter (a–z or A–Z)
is_lowercase(C) 1 C is a lowercase letter (a–z)
is_uppercase(C) 1 C is an uppercase letter (A–Z)
is_number(C) 1 C is a digit (0–9)
is_space(C) 1 C is a space character
is_comma(C) 1 C is a comma
is_fullstop(C) 1 C is a full stop (period)

Not all relations appear in every task; the bias file for each task lists the relations available to the learner.

Source: Andrew Cropper. "Playgol: Learning Programs Through Play." Proceedings of the 28th International Joint Conference on Artificial Intelligence (IJCAI), 2019.