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

Fix team names and add round number to visualizer #264

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kaggle_environments/envs/llm_20_questions/llm_20_questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async function renderer(context) {

const info = environment.info;
const team1_text = info?.TeamNames?.[0] || "Team 1";
const team2_text = info?.TeamNames?.[1] || "Team 2";
const team2_text = info?.TeamNames?.[2] || "Team 2";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we show both team names for the (two-team) team?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in a follow up


const ctx = canvas.getContext("2d");
const padding = 20;
Expand All @@ -112,12 +112,13 @@ async function renderer(context) {

// Keyword Row
ctx.fillText("Keyword: " + state[1].observation.keyword, label_x, line_height * line);
ctx.fillText("Round: " + Math.floor(step / 3 + 1), team2_x, line_height * line);

line += 2;

// Team Row
ctx.fillText(team1_text, team1_x, line_height * line);
ctx.fillText(team2_text, team2_x, line_height *line);
ctx.fillText(team2_text, team2_x, line_height * line);

line++;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
def guesser_agent(obs):
info_prompt = """You are playing a game of 20 questions where you ask the questions and try to figure out the keyword, which will be a real or fictional person, place, or thing. \nHere is what you know so far:\n{q_a_thread}"""
questions_prompt = """Ask one yes or no question."""
guess_prompt = """Guess the keyword. Only respond with the exact word/phrase. For example, if you think the keyword is [paris], don't respond with [I think the keyword is paris] or [Is the kewyord Paris?]. Respond only with the word [paris]."""
guess_prompt = """Guess the keyword. Only respond with the exact word/phrase. For example, if you think the keyword is [paris], don't respond with [I think the keyword is paris] or [Is the keyword Paris?]. Respond only with the word [paris]."""

q_a_thread = ""
for i in range(0, len(obs.answers)):
Expand Down
Loading