Testfest for homework 12

Test cases are in rows. Programs submitted by pairs are in columns.

In each cell, a check mark indicates that the program passed the test. A cross, that it failed the test. A squiggle, that it passed for some combinations of pretty-printed or one-line output, and rapidly-transmitted vs trickle-fed output, but failed for other combinations.

Pairs are identified by the last four digits of their NUIDs (in the same order as their CCS ids appear in their class repo name). Tests are identified similarly, but with the addition of the test number after the two NUID fragments.

Each cell in each row in the matrix is a hyperlink to the test case inputs and outputs.

Results matrix

Test case 0067-2657 1073-0623 1976-3959 2598-3830 3561 3731-5223 3982-9634 4890-1606 6112-0807 6118-7013 6344-7167 7214-1853 7469-8070 7498-5803 7920-6080 8179-2198 8949-0357 9159-7391 9951-4071
1976-3959-1
×
×
×
×
×
×
×
×
1976-3959-2
×
×
×
×
×
×
×
×
1976-3959-3
×
×
×
×
×
×
×
×
1976-3959-4
×
×
×
×
×
×
×
×
×
1976-3959-5
×
×
×
×
×
×
×
×
×
3731-5223-2
×
×
×
×
×
×
×
×
3731-5223-3
×
×
×
×
×
×
×
×
3731-5223-5
×
×
×
×
×
×
×
×
×
4890-1606-3
×
×
×
×
×
×
×
×
4890-1606-4
×
×
×
×
×
×
×
×
×
6112-0807-1
×
×
×
×
×
×
×
6112-0807-2
×
×
×
×
×
×
×
×
6112-0807-3
×
×
×
×
×
×
×
×
6112-0807-4
×
×
×
×
×
×
×
×
×
6112-0807-5
×
×
×
×
×
×
×
×
7214-1853-1
×
×
×
×
×
×
×
×
7214-1853-2
×
×
×
×
×
×
×
×
×
7469-8070-1
×
×
×
×
×
×
×
7469-8070-2
×
×
×
×
×
×
×
7469-8070-3
×
×
×
×
×
×
×
7469-8070-4
×
×
×
×
×
×
×
7920-6080-1
×
×
×
×
×
×
×
×
7920-6080-2
×
×
×
×
×
×
×
×
7920-6080-3
×
×
×
×
×
×
×
×
×
8179-2198-1
×
×
×
×
×
×
×
×
×
8179-2198-2
×
×
×
×
×
×
×
×
×
×
9159-7391-1
×
×
×
×
×
×
×
9159-7391-2
×
×
×
×
×
×
×
9159-7391-3
×
×
×
×
×
×
×
9159-7391-4
×
×
×
×
×
×
×
9159-7391-5
×
×
×
×
×
×
×
9951-4071-2
×
×
×
×
×
×
×
9951-4071-4
×
×
×
×
×
×
×
×
9951-4071-5
×
×
×
×
×
×
×
×
matthias-1
×
×
×
×
×
×
×
×
matthias-2
×
×
×
×
×
×
×
×
matthias-3
×
×
×
×
×
×
×
×
matthias-4
×
×
×
×
×
×
×
×

Test cases

1976-3959-1

Input:

[
    [
        ["id", 1],
        ["species", [[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
        ["bag", 1],
        ["cards", [[2, "horns"], [1, "horns"], [0, "horns"], [-1, "horns"]]]
    ],
    [],
    []
]


Output:

[3, [["population", 1, 0]], [], [[2, 1]], []]

1976-3959-2

Input:

[[["id", 1],
  ["species", [[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
  ["bag", 1],
  ["cards",
   [[1, "carnivore"], [1, "symbiosis"], [1, "fat-tissue"], [1, "foraging"]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]]
]

Output:

[0, [["population", 1, 1]], [], [[2, 3]], []]

1976-3959-3

Input:

[[["id", 1],
  ["species", [[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
  ["bag", 1],
  ["cards",
   [[1, "carnivore"],
    [1, "symbiosis"],
    [1, "fat-tissue"],
    [1, "foraging"],
    [1, "horns"]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]]
]

Output:

[0, [["population", 1, 4]], [["body", 1, 1]], [[2, 3]], []]

1976-3959-4

Input:

[[["id", 1],
  ["species", [[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
  ["bag", 1],
  ["cards",
   [[1, "carnivore"],
    [1, "symbiosis"],
    [1, "fat-tissue"],
    [1, "foraging"],
    [1, "horns"],
    [1, "warning-call"]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]]
]

Output:

[0, [["population", 1, 4]], [["body", 1, 1]], [[2, 3]], [[1, 0, 5]]]

1976-3959-5

Input:

[[["id", 1],
  ["species", [[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
  ["bag", 1],
  ["cards",
   [[1, "carnivore"],
    [1, "symbiosis"],
    [1, "fat-tissue"],
    [1, "foraging"],
    [1, "horns"],
    [1, "warning-call"],
    [1, "climbing"]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]],
 [[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]]
]

Output:

[0, [["population", 1, 3]], [["body", 1, 4]], [[6, 2]], [[1, 0, 1]]]

3731-5223-2

Input:

[[["id", 2], ["species", [[["food", 0], ["body", 1], ["population", 3], ["traits", []]], [["food", 0], ["body", 2], ["population", 3], ["traits", ["carnivore"]]]]], ["bag", 0], ["cards", [[2, "fertile"], [0, "long-neck"], [0, "ambush"], [0, "cooperation"]]]], [[[["food", 0], ["body", 1], ["population", 1], ["traits", []]], [["food", 0], ["body", 1], ["population", 1], ["traits", []]]]], [[[["food", 2], ["body", 1], ["population", 2], ["traits", []]], [["food", 1], ["body", 1], ["population", 1], ["traits", []]]]]]

Output:

[2, [["population", 2, 1]], [], [[3, 0]], []]

3731-5223-3

Input:

[[["id", 3], ["species", [[["food", 0], ["body", 1], ["population", 3], ["traits", []]], [["food", 0], ["body", 2], ["population", 3], ["traits", ["carnivore"]]]]], ["bag", 0], ["cards", [[2, "fertile"], [0, "long-neck"], [0, "ambush"], [0, "cooperation"], [0, "climbing"]]]], [[[["food", 0], ["body", 1], ["population", 1], ["traits", []]], [["food", 0], ["body", 1], ["population", 1], ["traits", []]]], [[["food", 2], ["body", 1], ["population", 2], ["traits", []]], [["food", 1], ["body", 1], ["population", 1], ["traits", []]]]], []]

Output:

[2, [["population", 2, 0]], [["body", 2, 1]], [[4, 3]], []]

3731-5223-5

Input:

[[["id", 1], ["species", [[["food", 0], ["body", 1], ["population", 3], ["traits", []]], [["food", 0], ["body", 2], ["population", 3], ["traits", ["carnivore"]]]]], ["bag", 0], ["cards", [[2, "fertile"], [0, "long-neck"], [0, "ambush"], [0, "cooperation"], [0, "climbing"], [0, "burrowing"], [-1, "cooperation"]]]], [], [[[["food", 0], ["body", 1], ["population", 1], ["traits", []]], [["food", 0], ["body", 1], ["population", 1], ["traits", []]]], [[["food", 2], ["body", 1], ["population", 2], ["traits", []]], [["food", 1], ["body", 1], ["population", 1], ["traits", []]]]]]

Output:

[2, [["population", 2, 6]], [["body", 2, 3]], [[5, 4]], [[2, 0, 0]]]

4890-1606-3

Input:

[
	[
		["id", 1],
		["species", [
			[
				["food", 0],
				["body", 5],
				["population", 2],
				["traits", ["carnivore", "cooperation"]]
			],
			[
				["food", 0],
				["body", 5],
				["population", 1],
				["traits", ["carnivore"]]
			]
		]],
		["bag", 4],
        ["cards", [
          [-3, "ambush"],
          [-2, "burrowing"],
          [-1, "carnivore"],
          [0, "horns"],
          [1, "pack-hunting"],
          [2, "pack-hunting"],
          [3, "pack-hunting"]
        ]]
	],
	[
		[
			[
				["food", 0],
				["body", 2],
				["population", 2],
				["traits", ["scavenger", "foraging", "cooperation"]]
			],
			[
				["food", 0],
				["body", 5],
				["population", 2],
				["traits", ["carnivore", "cooperation"]]
			]
		]
	],
	[
		[
			[
				["food", 0],
				["body", 4],
				["population", 1],
				["traits", []]
			]
		]
	]
]

Output:

[0, [["population", 2, 3]],[["body", 2, 4]],[[1, 2]],[[2, 0, 5]]]

4890-1606-4

Input:

[
	[
		["id", 1],
		["species", [
			[
				["food", 0],
				["body", 5],
				["population", 2],
				["traits", ["carnivore", "cooperation"]]
			],
			[
				["food", 0],
				["body", 5],
				["population", 1],
				["traits", ["carnivore"]]
			]
		]],
		["bag", 4],
        ["cards", [
          [-2, "burrowing"],
          [1, "pack-hunting"],
          [-1, "carnivore"],
          [-3, "ambush"],
          [3, "pack-hunting"],
          [0, "horns"],
          [2, "pack-hunting"]
        ]]
	],
	[
		[
			[
				["food", 0],
				["body", 2],
				["population", 2],
				["traits", ["scavenger", "foraging", "cooperation"]]
			],
			[
				["food", 0],
				["body", 5],
				["population", 2],
				["traits", ["carnivore", "cooperation"]]
			]
		]
	],
	[
		[
			[
				["food", 0],
				["body", 4],
				["population", 1],
				["traits", []]
			]
		]
	]
]

Output:

[3, [["population", 2, 5]],[["body", 2, 1]],[[0, 2]],[[2, 0, 6]]]

6112-0807-1

Input:

[
    [
        ["id", 1],
        ["species", [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 2],
        ["cards", [
            [1, "scavenger"],
            [-2, "long-neck"],
            [-1, "carnivore"],
            [1, "foraging"],
            [-2, "fertile"]
        ]]
    ],
    [],
    []
]

Output:

[2,[["population",1,1]],[["body",1,0]],[[4,3]],[]]

6112-0807-2

Input:

[
    [
        ["id", 1],
        ["species", [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 2],
        ["cards", [
            [1, "scavenger"],
            [-2, "scavenger"],
            [-1, "scavenger"],
            [-3, "scavenger"],
            [2, "scavenger"]
        ]]
    ],
    [],
    []

]

Output:

[3,[["population",1,0]],[["body",1,4]],[[1,2]],[]]

6112-0807-3

Input:

[
    [
        ["id", 1],
        ["species", [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 2],
        ["cards", [
            [1, "scavenger"],
            [-2, "scavenger"],
            [-1, "scavenger"],
            [-3, "scavenger"],
            [2, "scavenger"],
            [0, "ambush"],
            [5, "carnivore"]
        ]]
    ],
    [],
    []

]

Output:

[5,[["population",1,1]],[["body",1,2]],[[6,3]],[[1,0,0]]]

6112-0807-4

Input:

[
    [
        ["id", 1],
        ["species", [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 2],
        ["cards", [
            [1, "scavenger"],
            [-2, "scavenger"],
            [-1, "scavenger"],
            [-3, "scavenger"],
            [2, "scavenger"],
            [0, "ambush"],
            [5, "carnivore"]
        ]]
    ],
    [
        [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]
    ],
    [
        [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]
    ]

]

Output:

[5,[["population",1,1]],[["body",1,2]],[[6,3]],[[1,0,0]]]

6112-0807-5

Input:

[
    [
        ["id", 1],
        ["species", [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 2],
        ["cards", [
            [1, "scavenger"],
            [-2, "long-neck"],
            [-1, "carnivore"],
            [1, "foraging"]
        ]]
    ],
    [
        [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]
    ],
    [
        [
            [
                ["food", 0],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]
    ]
]

Output:

[2,[["population",1,0]],[],[[3,1]],[]]

7214-1853-1

Input:

[
    [
        ["id", 5],
        ["species", [
            [
                ["food", 1],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 10],
        ["cards", [
            [3, "climbing"],
            [2, "burrowing"],
            [-3, "ambush"],
            [7, "carnivore"]
        ]]
    ],
    [
        [
            [
                ["food", 1],
                ["body", 5],
                ["population", 3],
                ["traits", ["fat-tissue"]],
                ["fat-food", 4]
            ],
            [
                ["food", 3],
                ["body", 4],
                ["population", 5],
                ["traits", []]
            ]
        ]
    ],
    [
        [
            [
                ["food", 2],
                ["body", 4],
                ["population", 2],
                ["traits", ["carnivore"]]
            ]
        ]
    ]
]

Output:

[
    2,
    [
        ["population", 1, 0]
    ],
    [],
    [
        [1, 3]
    ],
    []
]

7214-1853-2

Input:

[
    [
        ["id", 5],
        ["species", [
            [
                ["food", 1],
                ["body", 2],
                ["population", 1],
                ["traits", ["carnivore"]]
            ]
        ]],
        ["bag", 10],
        ["cards", [
            [3, "climbing"],
            [2, "burrowing"],
            [-3, "ambush"],
            [7, "carnivore"],
            [2, "symbiosis"],
            [-2, "symbiosis"]
        ]]
    ],
    [
        [
            [
                ["food", 1],
                ["body", 5],
                ["population", 3],
                ["traits", ["fat-tissue"]],
                ["fat-food", 4]
            ],
            [
                ["food", 3],
                ["body", 4],
                ["population", 5],
                ["traits", []]
            ]
        ]
    ],
    [
        [
            [
                ["food", 2],
                ["body", 4],
                ["population", 2],
                ["traits", ["carnivore"]]
            ]
        ]
    ]
]

Output:

[
    2,
    [
        ["population", 1, 0]
    ],
    [
        ["body", 1, 5]
    ],
    [
        [1, 3]
    ],
    [
        [1, 0, 4]
    ]
]

7469-8070-1

Input:

[
    [
        ["id", 1],
        ["species", []],
        ["bag", 0],
        ["cards", [
            [1, "carnivore"],
            [2, "carnivore"],
            [3, "carnivore"],
            [4, "carnivore"]
        ]]
    ],
    [],
    []
]

Output:

[0, [["population", 0, 3]], [], [[1, 2]], []]

7469-8070-2

Input:

[
    [
        ["id", 1],
        ["species", []],
        ["bag", 0],
        ["cards", [
            [1, "carnivore"],
            [2, "carnivore"],
            [3, "carnivore"],
            [4, "carnivore"],
            [5, "carnivore"]
        ]]
    ],
    [],
    []
]

Output:

[0, [["population", 0, 3]], [["body", 0, 4]], [[1, 2]], []]

7469-8070-3

Input:

[
    [
        ["id", 1],
        ["species", []],
        ["bag", 0],
        ["cards", [
            [1, "carnivore"],
            [2, "carnivore"],
            [3, "carnivore"],
            [4, "carnivore"],
            [5, "carnivore"],
            [6, "carnivore"]
        ]]
    ],
    [],
    []
]

Output:

[0, [["population", 0, 3]], [["body", 0, 4]], [[1, 2]], [[0, 0, 5]]]

7469-8070-4

Input:

[
    [
        ["id", 1],
        ["species", []],
        ["bag", 0],
        ["cards", [
            [1, "carnivore"],
            [2, "carnivore"],
            [3, "carnivore"],
            [4, "carnivore"],
            [5, "carnivore"],
            [6, "carnivore"],
            [7, "carnivore"]
        ]]
    ],
    [],
    []
]

Output:

[0, [["population", 0, 3]], [["body", 0, 4]], [[1, 2]], [[0, 0, 5]]]

7920-6080-1

Input:

[[["id", 1],
["species", 
	[[["food", 0], ["body", 2], ["population", 2], ["traits", ["warning-call"]]]]],
["bag", 0],
["cards", [[-3, "carnivore"],
		   [0, "fat-tissue"],
		   [3, "scavenger"],
		   [2, "fertile"]]]],

[],

[
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]],
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]
]]

Output:

[0, [["population", 1, 2]], [], [[1, 3]], []]

7920-6080-2

Input:

[[["id", 1],
["species", 
	[[["food", 0], ["body", 2], ["population", 2], ["traits", ["warning-call"]]]]],
["bag", 0],
["cards", [[-3, "carnivore"],
		   [0, "fat-tissue"],
		   [3, "scavenger"],
		   [2, "fertile"],
		   [-2, "long-neck"]]]],

[],

[
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]],
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]
]]

Output:

[0, [["population", 1, 4]], [["body", 1, 2]], [[1, 3]], []]

7920-6080-3

Input:

[[["id", 1],
["species", 
	[[["food", 0], ["body", 2], ["population", 2], ["traits", ["warning-call"]]]]],
["bag", 0],
["cards", [[-3, "carnivore"],
		   [0, "fat-tissue"],
		   [3, "scavenger"],
		   [2, "fertile"],
		   [-2, "long-neck"],
		   [1, "warning-call"]]]],

[],

[
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]],
	[[["food", 0], ["body", 0], ["population", 1], ["traits", []]]]
]]

Output:

[0, [["population", 1, 4]], [["body", 1, 2]], [[1, 3]], [[1, 0, 5]]]

8179-2198-1

Input:

[
  [
    ["id",1],
    ["species",[
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]]]],
    ["bag",0],
    ["cards", [[-4, "carnivore"], [2, "cooperation"], [-3, "foraging"], [-1, "cooperation"]]]],
  [],
  [
    [
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]
      ]
    ],
    [
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]
      ]
    ]
  ]
]

Output:

[0, [["population", 1, 2]], [], [[3, 1]], []]

8179-2198-2

Input:

[
  [
    ["id",1],
    ["species",[
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]],
      [
        ["food",0],
        ["body",3],
        ["population",7],
        ["traits",[]]]
    ]],
    ["bag",0],
    ["cards", [[7, "carnivore"], [2, "warning-call"], [-3, "foraging"], [-1, "cooperation"],
      [0, "fat-tissue"], [-3, "symbiosis"], [2, "hard-shell"], [-4, "carnivore"]]]],
  [],
  [
    [
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]
      ]
    ],
    [
      [
        ["food",0],
        ["body",0],
        ["population",1],
        ["traits",[]]
      ]
    ]
  ]
]

Output:

[7, [["population", 2, 4]], [["body", 2, 2]], [[0, 3]], [[2, 0, 6]]]

9159-7391-1

Input:

[
 [["id",1],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",0],["cards",[[1,"ambush"],[2,"climbing"],[3,"carnivore"],[1,"hard-shell"]]]],
 [],
 []
]

Output:

[0,[["population",1,3]],[],[[2,1]],[]]

9159-7391-2

Input:

[
 [["id",1],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",0],["cards",[[1,"ambush"],[2,"climbing"],[3,"carnivore"],[1,"hard-shell"],[2,"herding"],[3,"pack-hunting"]]]],
 [],
 []
]

Output:

[0,[["population",1,3]],[["body",1,4]],[[2,1]],[[1,0,5]]]

9159-7391-3

Input:

[
 [["id",1],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",0],["cards",[[1,"ambush"],[2,"climbing"],[3,"carnivore"],[1,"hard-shell"],[2,"herding"]]]],
 [],
 []
]

Output:

[0,[["population",1,3]],[["body",1,4]],[[2,1]],[]]

9159-7391-4

Input:

[
 [["id",2],["species",[[["food",0],["body",0],["population",1],["traits",[]]],[["food",1],["body",1],["population",1],["traits",[]]]]],["bag",0],["cards",[[1,"ambush"],[2,"climbing"],[3,"carnivore"],[1,"hard-shell"]]]],
 [],
 []
]

Output:

[0,[["population",2,3]],[],[[2,1]],[]]

9159-7391-5

Input:

[
 [["id",2],["species",[[["food",0],["body",0],["population",1],["traits",[]]],[["food",1],["body",1],["population",1],["traits",[]]]]],["bag",0],["cards",[[1,"ambush"],[2,"climbing"],[3,"carnivore"],[1,"hard-shell"],[2,"herding"],[3,"pack-hunting"]]]],
 [],
 []
]

Output:

[0,[["population",2,3]],[["body",2,4]],[[2,1]],[[2,0,5]]]

9951-4071-2

Input:

[
	[
		["id", 1],
		["species",
			[
				[
					["food",0],
					["body",7],
					["population",7],
					["traits",[]]
				]
			]
		],
		["bag", 0],
		["cards",
			[
				[1, "carnivore"],
				[2, "carnivore"],
				[3, "carnivore"],
				[4, "carnivore"],
				[5, "carnivore"],
				[6, "carnivore"],
				[7, "carnivore"]
			]
		]
	],
	[],
	[]
]

Output:

[
	0,
	[
		["population", 1, 3]
	],
	[
		["body", 1, 4]
	],
	[
		[1, 2]
	],
	[
		[1, 0, 5]
	]
]

9951-4071-4

Input:

[
	[
		["id", 1],
		["species",
			[
				[
					["food",0],
					["body",7],
					["population",7],
					["traits",[]]
				]
			]
		],
		["bag", 0],
		["cards",
			[
				[1, "fertile"],
				[-3, "foraging"],
				[2, "fat-tissue"],
				[3, "fat-tissue"]
			]
		]
	],
	[],
	[]
]

Output:

[
	2,
	[["population", 1, 1]],
	[],
	[[3, 0]],
	[]
]

9951-4071-5

Input:

[
	[
		["id", 1],
		["species",
			[
				[
					["food",0],
					["body",7],
					["population",7],
					["traits",[]]
				]
			]
		],
		["bag", 0],
		["cards",
			[
				[1, "fertile"],
				[-3, "foraging"],
				[2, "fat-tissue"],
				[3, "fat-tissue"],
				[-2, "foraging"]
			]
		]
	],
	[],
	[]
]

Output:

[
	2,
	[["population", 1, 1]],
	[["body", 1, 4]],
	[[3, 0]],
	[]
]

matthias-1

Input:

[[["id",75],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",37],["cards",[[-3,"ambush"],[-2,"ambush"],[-1,"ambush"],[0,"ambush"]]]],[[],[]],[[]]]

Output:

[0,[["population",1,3]],[],[[1,2]],[]]

matthias-2

Input:

[[["id",63],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",95],["cards",[[-3,"ambush"],[-2,"ambush"],[-1,"ambush"],[0,"ambush"],[1,"ambush"]]]],[[],[]],[[]]]

Output:

[0,[["population",1,3]],[["body",1,4]],[[1,2]],[]]

matthias-3

Input:

[[["id",41],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",53],["cards",[[-3,"ambush"],[-2,"ambush"],[-1,"ambush"],[0,"ambush"],[1,"ambush"],[2,"ambush"]]]],[[],[]],[[]]]

Output:

[0,[["population",1,3]],[["body",1,4]],[[1,2]],[[1,0,5]]]

matthias-4

Input:

[[["id",71],["species",[[["food",0],["body",0],["population",1],["traits",[]]]]],["bag",73],["cards",[[-3,"ambush"],[-2,"ambush"],[-1,"ambush"],[0,"ambush"],[1,"ambush"],[2,"ambush"],[3,"ambush"]]]],[[],[]],[[]]]

Output:

[0,[["population",1,3]],[["body",1,4]],[[1,2]],[[1,0,5]]]