Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate LLM Agents #40

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

Integrate LLM Agents #40

wants to merge 28 commits into from

Conversation

chalo2000
Copy link
Contributor

Overview

This PR adds LLM agent infrastructure into Robotouille including

  • language-based observations through Gym
  • LLM agents with a prompt_builder for version controlling prompts
    • OpenAI, Google, Anthropic model support
  • human agent for collecting demonstrations to convert into in-context examples

Changes Made

Environment

  • robotouille.json augmented to include language descriptors to describe predicates and actions in language
  • Environment JSONs goal_description field changed from solely readability purposes to also being included as the language goal of the environment
  • New environments from paper added including synchronous, asynchronous, and multi-agent environments. Find these under environments/env_generator/examples/

Agent

  • Agents added including
  • Prompt builder for version controlling prompts
    • Prompts used in our paper included under agents/prompt_builder/prompts/
  • In-context examples flow for inserting N random few-shot examples into existing prompts
    • Examples used in our paper included under agents/in_context_examples/data/
  • gpt-cost-estimator integrated for calculating OpenAI model cost

Misc / Bug Fixes

  • Hydra library integrated to simplify configuration management
  • Update main.py to incorporate Hydra.
  • New logging including videos and text logging (for LLM agent reasoning and human demonstrations in the form of ReAct in-context examples)
  • simulator deprecated - use run_robotouille instead which uses the new main.py flow using Hydra
  • Added procedural generation for containers
    • Fixed procedural generation bugs
  • Custom deepcopy added to RobotouilleCanvas to avoid deepcopying PyGame surfaces (for BFS agent)
  • Conditional effects have their effects negated if not met (e.g. stops cooking if an item placed on a stove is picked up)
  • Documentation updated and added for new directories

Test Coverage

Tested a fresh environment on Windows and Mac following top-level README.md and agent/ directory README.md

Related PRs or Issues

#37
#38

lsuyean and others added 28 commits May 1, 2024 15:49
* rough draft of creation effect

* implemented pickup and place container

* implemented fill water

* Made boil water: bug when creating new objects, no id assigned

* boil soup bug fixed

* finish implementing all actions

* implemented cook soup test

* added conditional delayed effect for cook, boil, and fry; added versions to env files; empty fields in problem files not not required

* updated based on comments

* edited goal such that it can include objects not in initial state

* pddl functions uncommented

* fixed bug for station location predicates and no conditional effect for filling water

* addressed comments, fixed bug in creation effect

* fixed tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants