Datasets:

Modalities:
Text
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
Harbor
License:
lewtun HF Staff commited on
Commit
4331db4
·
verified ·
1 Parent(s): 05bdfbe

s3-aggregation: 160 tasks from seed 115, role files, grader, oracle, checks (part 5)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. tasks/agg-p07-n01/tests/test.sh +42 -0
  2. tasks/agg-p07-n02/instruction.md +20 -0
  3. tasks/agg-p07-n02/solution/solve.sh +5 -0
  4. tasks/agg-p07-n02/task.toml +26 -0
  5. tasks/agg-p07-n02/tests/expected.json +1 -0
  6. tasks/agg-p07-n02/tests/test.sh +42 -0
  7. tasks/agg-p07-n04/instruction.md +20 -0
  8. tasks/agg-p07-n04/solution/solve.sh +5 -0
  9. tasks/agg-p07-n04/task.toml +26 -0
  10. tasks/agg-p07-n04/tests/expected.json +1 -0
  11. tasks/agg-p07-n04/tests/test.sh +42 -0
  12. tasks/agg-p07-n08/instruction.md +20 -0
  13. tasks/agg-p07-n08/solution/solve.sh +5 -0
  14. tasks/agg-p07-n08/task.toml +26 -0
  15. tasks/agg-p07-n08/tests/expected.json +1 -0
  16. tasks/agg-p07-n08/tests/test.sh +42 -0
  17. tasks/agg-p07-n16/instruction.md +20 -0
  18. tasks/agg-p07-n16/solution/solve.sh +5 -0
  19. tasks/agg-p07-n16/task.toml +26 -0
  20. tasks/agg-p07-n16/tests/expected.json +1 -0
  21. tasks/agg-p07-n16/tests/test.sh +42 -0
  22. tasks/agg-p08-n01/instruction.md +8 -0
  23. tasks/agg-p08-n01/solution/solve.sh +5 -0
  24. tasks/agg-p08-n01/task.toml +26 -0
  25. tasks/agg-p08-n01/tests/expected.json +1 -0
  26. tasks/agg-p08-n01/tests/test.sh +42 -0
  27. tasks/agg-p08-n02/instruction.md +20 -0
  28. tasks/agg-p08-n02/solution/solve.sh +5 -0
  29. tasks/agg-p08-n02/task.toml +26 -0
  30. tasks/agg-p08-n02/tests/expected.json +1 -0
  31. tasks/agg-p08-n02/tests/test.sh +42 -0
  32. tasks/agg-p08-n04/instruction.md +20 -0
  33. tasks/agg-p08-n04/solution/solve.sh +5 -0
  34. tasks/agg-p08-n04/task.toml +26 -0
  35. tasks/agg-p08-n04/tests/expected.json +1 -0
  36. tasks/agg-p08-n04/tests/test.sh +42 -0
  37. tasks/agg-p08-n08/instruction.md +20 -0
  38. tasks/agg-p08-n08/solution/solve.sh +5 -0
  39. tasks/agg-p08-n08/task.toml +26 -0
  40. tasks/agg-p08-n08/tests/expected.json +1 -0
  41. tasks/agg-p08-n08/tests/test.sh +42 -0
  42. tasks/agg-p08-n16/instruction.md +20 -0
  43. tasks/agg-p08-n16/solution/solve.sh +5 -0
  44. tasks/agg-p08-n16/task.toml +26 -0
  45. tasks/agg-p08-n16/tests/expected.json +1 -0
  46. tasks/agg-p08-n16/tests/test.sh +42 -0
  47. tasks/agg-p09-n01/instruction.md +8 -0
  48. tasks/agg-p09-n01/solution/solve.sh +5 -0
  49. tasks/agg-p09-n01/task.toml +26 -0
  50. tasks/agg-p09-n01/tests/expected.json +1 -0
tasks/agg-p07-n01/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p07-n02/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 2 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 2 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 2 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p07-n02/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[36, 49]' > "$answer"
tasks/agg-p07-n02/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p07-n02"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 2 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 7
11
+ agents = 2
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p07-n02/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [36, 49]
tasks/agg-p07-n02/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p07-n04/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 4 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 4 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 4 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p07-n04/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[36, 38, 48, 49]' > "$answer"
tasks/agg-p07-n04/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p07-n04"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 4 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 7
11
+ agents = 4
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p07-n04/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [36, 38, 48, 49]
tasks/agg-p07-n04/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p07-n08/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 8 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 8 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 8 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p07-n08/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[8, 22, 36, 38, 48, 49, 54, 88]' > "$answer"
tasks/agg-p07-n08/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p07-n08"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 8 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 7
11
+ agents = 8
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p07-n08/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [8, 22, 36, 38, 48, 49, 54, 88]
tasks/agg-p07-n08/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p07-n16/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 16 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 16 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 16 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p07-n16/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[2, 8, 9, 16, 22, 25, 36, 38, 42, 48, 49, 54, 66, 78, 86, 88]' > "$answer"
tasks/agg-p07-n16/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p07-n16"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 16 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 7
11
+ agents = 16
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p07-n16/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [2, 8, 9, 16, 22, 25, 36, 38, 42, 48, 49, 54, 66, 78, 86, 88]
tasks/agg-p07-n16/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p08-n01/instruction.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are the only agent on this team, solving a private-information number sorting task. You
4
+ hold one private integer from 1 to 99, written in English words. It is in your instructions,
5
+ under "Your private number".
6
+
7
+ Write `/app/answer.json` (create `/app` if needed): a JSON array holding your number's numeric
8
+ value, as digits. Then stop.
tasks/agg-p08-n01/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[37]' > "$answer"
tasks/agg-p08-n01/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p08-n01"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 1 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 8
11
+ agents = 1
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p08-n01/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [37]
tasks/agg-p08-n01/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p08-n02/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 2 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 2 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 2 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p08-n02/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[37, 71]' > "$answer"
tasks/agg-p08-n02/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p08-n02"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 2 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 8
11
+ agents = 2
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p08-n02/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [37, 71]
tasks/agg-p08-n02/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p08-n04/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 4 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 4 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 4 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p08-n04/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[37, 44, 71, 88]' > "$answer"
tasks/agg-p08-n04/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p08-n04"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 4 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 8
11
+ agents = 4
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p08-n04/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [37, 44, 71, 88]
tasks/agg-p08-n04/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p08-n08/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 8 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 8 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 8 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p08-n08/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[24, 35, 37, 44, 66, 68, 71, 88]' > "$answer"
tasks/agg-p08-n08/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p08-n08"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 8 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 8
11
+ agents = 8
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p08-n08/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [24, 35, 37, 44, 66, 68, 71, 88]
tasks/agg-p08-n08/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p08-n16/instruction.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are on a team of 16 agents solving a private-information number sorting task. Each agent
4
+ holds one private integer from 1 to 99, written in English words. Yours is in your instructions,
5
+ under "Your private number". You know only your own number, and the others don't know it unless
6
+ you tell them.
7
+
8
+ The team must find all 16 numbers and list their numeric values in ascending order. Keep equal
9
+ numbers from different agents as separate entries: each agent's number appears once in the list,
10
+ even when another agent holds the same value.
11
+
12
+ 1. Share your number with the team on the message board.
13
+ 2. Read the board for the other participants' numbers. Note which participant each number came
14
+ from, so that a number posted more than once is counted once.
15
+ 3. Once you have one number from every participant, yourself included, write `/app/answer.json`
16
+ (create `/app` if needed): a JSON array of the 16 integers, as digits, in ascending order.
17
+ Then stop.
18
+
19
+ Any agent may write the full answer, and the team succeeds if at least one agent's answer is
20
+ correct. Your instructions name the other participants and explain the board's tools.
tasks/agg-p08-n16/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[23, 24, 35, 37, 44, 56, 64, 66, 68, 70, 70, 71, 76, 84, 88, 92]' > "$answer"
tasks/agg-p08-n16/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p08-n16"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 16 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 8
11
+ agents = 16
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p08-n16/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [23, 24, 35, 37, 44, 56, 64, 66, 68, 70, 70, 71, 76, 84, 88, 92]
tasks/agg-p08-n16/tests/test.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Reward 1 if /app/answer.json is exactly expected.json: a JSON array of the team's integers in
3
+ # ascending order, one per agent (equal numbers kept). Anything else scores 0: a missing or
4
+ # unreadable file, invalid UTF-8 or JSON, NaN or Infinity, a non-array, strings, floats or
5
+ # booleans, a missing, extra or dropped duplicate number, and a wrong order. The script writes 0
6
+ # before it checks anything, so a crash of the check also leaves reward 0, and keeps a copy of
7
+ # the answer with the trial's results. ANSWER, EXPECTED and VERIFIER_DIR override the paths, to
8
+ # test the grader locally.
9
+ answer=${ANSWER:-/app/answer.json}
10
+ expected=${EXPECTED:-$(dirname "$0")/expected.json}
11
+ verifier=${VERIFIER_DIR:-/logs/verifier}
12
+ mkdir -p "$verifier"
13
+ echo 0 > "$verifier/reward.txt"
14
+ cp "$answer" "$verifier/answer.json" 2>/dev/null || true
15
+ ANSWER="$answer" EXPECTED="$expected" VERIFIER_DIR="$verifier" python3 - <<'PY' || true
16
+ import json
17
+ import os
18
+
19
+
20
+ def reject_constant(name):
21
+ raise ValueError(f"{name} is not JSON")
22
+
23
+
24
+ def load(path):
25
+ with open(path, "rb") as stream:
26
+ return json.loads(stream.read().decode("utf-8"), parse_constant=reject_constant)
27
+
28
+
29
+ try:
30
+ answer, expected = load(os.environ["ANSWER"]), load(os.environ["EXPECTED"])
31
+ valid = (
32
+ isinstance(answer, list)
33
+ and all(type(x) is int for x in answer) # not bool, float or str
34
+ and answer == expected
35
+ )
36
+ except Exception: # missing file, invalid UTF-8 or JSON, NaN, RecursionError
37
+ valid = False
38
+ if valid:
39
+ with open(os.path.join(os.environ["VERIFIER_DIR"], "reward.txt"), "w") as stream:
40
+ stream.write("1")
41
+ print("reward:", 1 if valid else 0)
42
+ PY
tasks/agg-p09-n01/instruction.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Sort the team's private numbers
2
+
3
+ You are the only agent on this team, solving a private-information number sorting task. You
4
+ hold one private integer from 1 to 99, written in English words. It is in your instructions,
5
+ under "Your private number".
6
+
7
+ Write `/app/answer.json` (create `/app` if needed): a JSON array holding your number's numeric
8
+ value, as digits. Then stop.
tasks/agg-p09-n01/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Oracle: the team's answer from its own copy (not tests/), to validate the grader.
3
+ answer=${ANSWER:-/app/answer.json}
4
+ mkdir -p "$(dirname "$answer")"
5
+ echo '[40]' > "$answer"
tasks/agg-p09-n01/task.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ schema_version = "1.4"
2
+
3
+ [task]
4
+ name = "HuggingFaceSwarms/agg-p09-n01"
5
+ version = "0.1.0"
6
+ description = "s3-aggregation: 1 agents each hold a private number; the team lists them all in ascending order."
7
+ keywords = ["multi-agent", "message-board", "s3", "aggregation"]
8
+
9
+ [metadata]
10
+ problem = 9
11
+ agents = 1
12
+ seed = 115
13
+
14
+ [agent]
15
+ timeout_sec = 1800
16
+
17
+ [environment]
18
+ # Prebuilt and public, with no Dockerfile: HF Sandboxes need one, and docker and podman use it
19
+ # too. Nothing task-specific is in the container: each agent's number reaches it only through
20
+ # its own instructions (the flock role file), and tests/ arrive only when the agent is done.
21
+ docker_image = "python:3.12-slim"
22
+ cpus = 1
23
+ memory_mb = 1024
24
+
25
+ [verifier]
26
+ timeout_sec = 60
tasks/agg-p09-n01/tests/expected.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [40]