CS588 Programming Assignment #2

Overview

Developing Environment

Code Instruction

  1. Create the environment
conda create -n alfworld_agent python=3.10 -y conda activate alfworld_agent pip install -r requirements.txt
  1. Download ALFWorld data (~5 GB, only needs to run once)
alfworld-download
  1. Get a Gemini API key (free)
export GEMINI_API_KEY="your-key-here"
  1. Run the agent
python src/main.py

Background

ALFWorld is a text-based environment where an agent must complete household tasks such as "put a clean mug on the shelf." The agent receives:

The provided code implements a ReAct agent (Yao et al., ICLR 2023) that uses a Thought → Action → Observation loop with the Gemma 3 27B model via the Gemini API.

Requirements

1. Trajectory Analysis (10 pts)

Open the result JSON file in eval_results/. Each episode contains a trajectory array where each entry has thought, action, and observation.

2. Discussion (10 pts)

Submission

Policies