{"abstract":"Steps are too long or too short depending on the magnitude of J J^T e.","category":"Inverse kinematics solvers","checks":7,"contract":"Input [l1,l2,q1,q2,tx,ty]: one Jacobian-transpose step for a planar 2R arm with the error-optimal gain alpha = <e, J J^T e> / <J J^T e, J J^T e>, dq = alpha J^T e. When <J J^T e, J J^T e> < 1e-15 return [\"stationary\", q1, q2]. Otherwise return [\"step\", alpha (6 decimals), q1 and q2 updated in degrees (4 decimals)].","contract_signature":"x","evaluation_group":"w2-inverse_kinematics_solvers-jacobian-transpose-adaptive","failed_approach":"Adding 1 to the denominator as a regulariser biases every gain low.","family":"w2-inverse_kinematics_solvers-jacobian-transpose-adaptive-gain-denominator","id":"FA-88336","implementations":{"attempt":{"sha256":"72018d865c34cf116bdd70f226b4a928cceb9e23f5f68b751306b004868af11a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    l1,l2,q1,q2,tx,ty=x\n    a=math.radians(q1)\n    b=math.radians(q1+q2)\n    ex=tx-(l1*math.cos(a)+l2*math.cos(b))\n    ey=ty-(l1*math.sin(a)+l2*math.sin(b))\n    j11=-l1*math.sin(a)-l2*math.sin(b)\n    j12=-l2*math.sin(b)\n    j21=l1*math.cos(a)+l2*math.cos(b)\n    j22=l2*math.cos(b)\n    g1=j11*ex+j21*ey\n    g2=j12*ex+j22*ey\n    h1=j11*g1+j12*g2\n    h2=j21*g1+j22*g2\n    den=h1*h1+h2*h2\n    if den<1e-15: return ['stationary',q1,q2]\n    alpha=(ex*h1+ey*h2)/(den+1.0)\n    return ['step',round(alpha,6),round(q1+math.degrees(alpha*g1),4),round(q2+math.degrees(alpha*g2),4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"791f5398eda76e2563610b739f553e7f85e30bad2132250c1711d1e61795a32d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    l1,l2,q1,q2,tx,ty=x\n    a=math.radians(q1)\n    b=math.radians(q1+q2)\n    ex=tx-(l1*math.cos(a)+l2*math.cos(b))\n    ey=ty-(l1*math.sin(a)+l2*math.sin(b))\n    j11=-l1*math.sin(a)-l2*math.sin(b)\n    j12=-l2*math.sin(b)\n    j21=l1*math.cos(a)+l2*math.cos(b)\n    j22=l2*math.cos(b)\n    g1=j11*ex+j21*ey\n    g2=j12*ex+j22*ey\n    h1=j11*g1+j12*g2\n    h2=j21*g1+j22*g2\n    den=h1*h1+h2*h2\n    if den<1e-15: return ['stationary',q1,q2]\n    alpha=(ex*h1+ey*h2)/math.sqrt(den)\n    return ['step',round(alpha,6),round(q1+math.degrees(alpha*g1),4),round(q2+math.degrees(alpha*g2),4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic planar or low-dimensional teaching model with a stipulated convention; not a general robotics library. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-inverse_kinematics_solvers-jacobian-transpose-adaptive-gain-denominator","generated_at":"2026-09-29T14:51:07.144645+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Inverse kinematics code turns task-space goals into joint commands; a wrong branch, sign, limit or update order sends a real arm to the wrong pose.","root_cause":"The denominator uses sqrt(h1^2+h2^2).","sha256":"07fa198b439a3060198565b751ac5bc746eaa324a05bfee0c077b33139bcfef7","title":"Adaptive gain divides by the norm instead of the squared norm · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.005,"exit_code":1,"observations":[{"actual":["step",0.176741,36.4368,63.7066],"check":"moderate error","expected":["step",0.263207,39.5859,65.5199],"passed":false},{"actual":["stationary",0,90],"check":"at target","expected":["stationary",0,90],"passed":true},{"actual":["step",0.273752,21.9914,74.9453],"check":"large error","expected":["step",0.287793,23.1194,76.4812],"passed":false},{"actual":["step",0.113241,53.2531,-32.8185],"check":"unequal links","expected":["step",0.11371,53.3906,-32.7888],"passed":false},{"actual":["step",0.165794,-41.3809,-64.7405],"check":"negative angles","expected":["step",0.183895,-42.6234,-65.2581],"passed":false},{"actual":["step",0.213106,153.3586,52.7843],"check":"behind base","expected":["step",0.217338,154.0209,53.2367],"passed":false},{"actual":["step",0.032167,10.3224,10.1615],"check":"small error","expected":["step",0.201469,12.0193,11.0115],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"moderate error\", \"actual\": [\"step\", 0.176741, 36.4368, 63.7066], \"expected\": [\"step\", 0.263207, 39.5859, 65.5199], \"passed\": false}, {\"check\": \"at target\", \"actual\": [\"stationary\", 0, 90], \"expected\": [\"stationary\", 0, 90], \"passed\": true}, {\"check\": \"large error\", \"actual\": [\"step\", 0.273752, 21.9914, 74.9453], \"expected\": [\"step\", 0.287793, 23.1194, 76.4812], \"passed\": false}, {\"check\": \"unequal links\", \"actual\": [\"step\", 0.113241, 53.2531, -32.8185], \"expected\": [\"step\", 0.11371, 53.3906, -32.7888], \"passed\": false}, {\"check\": \"negative angles\", \"actual\": [\"step\", 0.165794, -41.3809, -64.7405], \"expected\": [\"step\", 0.183895, -42.6234, -65.2581], \"passed\": false}, {\"check\": \"behind base\", \"actual\": [\"step\", 0.213106, 153.3586, 52.7843], \"expected\": [\"step\", 0.217338, 154.0209, 53.2367], \"passed\": false}, {\"check\": \"small error\", \"actual\": [\"step\", 0.032167, 10.3224, 10.1615], \"expected\": [\"step\", 0.201469, 12.0193, 11.0115], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.807,"exit_code":1,"observations":[{"actual":["step",0.376309,43.705,67.8919],"check":"moderate error","expected":["step",0.263207,39.5859,65.5199],"passed":false},{"actual":["stationary",0,90],"check":"at target","expected":["stationary",0,90],"passed":true},{"actual":["step",1.270732,102.0821,184.0033],"check":"large error","expected":["step",0.287793,23.1194,76.4812],"passed":false},{"actual":["step",1.76808,539.1933,72.1268],"check":"unequal links","expected":["step",0.11371,53.3906,-32.7888],"passed":false},{"actual":["step",0.556558,-68.2048,-75.9135],"check":"negative angles","expected":["step",0.183895,-42.6234,-65.2581],"passed":false},{"actual":["step",1.542404,361.4402,194.9067],"check":"behind base","expected":["step",0.217338,154.0209,53.2367],"passed":false},{"actual":["step",0.087818,10.8802,10.4409],"check":"small error","expected":["step",0.201469,12.0193,11.0115],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"moderate error\", \"actual\": [\"step\", 0.376309, 43.705, 67.8919], \"expected\": [\"step\", 0.263207, 39.5859, 65.5199], \"passed\": false}, {\"check\": \"at target\", \"actual\": [\"stationary\", 0, 90], \"expected\": [\"stationary\", 0, 90], \"passed\": true}, {\"check\": \"large error\", \"actual\": [\"step\", 1.270732, 102.0821, 184.0033], \"expected\": [\"step\", 0.287793, 23.1194, 76.4812], \"passed\": false}, {\"check\": \"unequal links\", \"actual\": [\"step\", 1.76808, 539.1933, 72.1268], \"expected\": [\"step\", 0.11371, 53.3906, -32.7888], \"passed\": false}, {\"check\": \"negative angles\", \"actual\": [\"step\", 0.556558, -68.2048, -75.9135], \"expected\": [\"step\", 0.183895, -42.6234, -65.2581], \"passed\": false}, {\"check\": \"behind base\", \"actual\": [\"step\", 1.542404, 361.4402, 194.9067], \"expected\": [\"step\", 0.217338, 154.0209, 53.2367], \"passed\": false}, {\"check\": \"small error\", \"actual\": [\"step\", 0.087818, 10.8802, 10.4409], \"expected\": [\"step\", 0.201469, 12.0193, 11.0115], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}