SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.07086 · 2024

Hypothetical Minds: Scaffolding Theory of Mind for Multi-Agent Tasks with Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 8 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
locross93/hypothetical-minds canonical 8 of 9
FunctionStatusWhere it lives
build_grid_from_states Ran locross93/hypothetical-minds/environments/collaborative_cooking__asymmetric.py
code served (permissive licence) · get_code("23cb6c922e448035")
check_plan_one_step Ran locross93/hypothetical-minds/environments/collaborative_cooking__asymmetric.py
code served (permissive licence) · get_code("35fe3ab85ed460a7")
heuristic Ran locross93/hypothetical-minds/llm_plan/agent/action_funcs.py
code served (permissive licence) · get_code("03d1701bcc7f74f8")
make_plan_grid Ran locross93/hypothetical-minds/environments/prisoners_dilemma_in_the_matrix__repeated.py
code served (permissive licence) · get_code("57e8e1d997e85ad3")
make_plan_grid Ran locross93/hypothetical-minds/environments/running_with_scissors_in_the_matrix__arena.py
code served (permissive licence) · get_code("619dd983b7fdcbf8")
make_plan_grid Ran locross93/hypothetical-minds/environments/running_with_scissors_in_the_matrix__repeated.py
code served (permissive licence) · get_code("66406aa32d538673")
move_to Ran locross93/hypothetical-minds/llm_plan/agent/action_funcs.py
code served (permissive licence) · get_code("039a1ae74573e452")
wait_for_pot Ran locross93/hypothetical-minds/environments/collaborative_cooking__asymmetric.py
code served (permissive licence) · get_code("b3027990b41faa44")
get_actions_from_path Not yet run locross93/hypothetical-minds/llm_plan/agent/action_funcs.py
code served (permissive licence) · get_code("6d9a311015cc512d")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Multi-agent reinforcement learning (MARL) methods struggle with the non-stationarity of multi-agent systems and fail to adaptively learn online when tested with novel agents. Here, we leverage large language models (LLMs) to create an autonomous agent that can handle these challenges. Our agent, Hypothetical Minds, consists of a cognitively-inspired architecture, featuring modular components for perception, memory, and hierarchical planning over two levels of abstraction. We introduce the Theory of Mind module that scaffolds the high-level planning process by generating hypotheses about other agents' strategies in natural language. It then evaluates and iteratively refines these hypotheses by reinforcing hypotheses that make correct predictions about the other agents' behavior. Hypothetical Minds significantly improves performance over previous LLM-agent and RL baselines on a range of competitive, mixed motive, and collaborative domains in the Melting Pot benchmark, including both dyadic and population-based environments. Additionally, comparisons against LLM-agent baselines and ablations reveal the importance of hypothesis evaluation and refinement for succeeding on complex scenarios.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2407.07086")
get_code_for_paper("2407.07086")
have("2407.07086")

Connect an agent — have() is free.