Skip to content

feat(agentic): add tictactoe web ui#105

Merged
xsuler merged 3 commits into
mainfrom
feat/agentic-tictactoe-web-ui
Jun 25, 2026
Merged

feat(agentic): add tictactoe web ui#105
xsuler merged 3 commits into
mainfrom
feat/agentic-tictactoe-web-ui

Conversation

@xsuler

@xsuler xsuler commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a cartoon Tic-Tac-Toe web UI backed by an OpenAI-compatible tool-call model.
  • Support keyboard/click moves and switching first player.
  • Clarify Tic-Tac-Toe prompts so digits are treated as empty square labels.

Closes #104

Tests

  • ruff check examples/agentic/tictactoe/game.py examples/agentic/tictactoe/run_agent.py examples/agentic/tictactoe/run_agent_no_tool.py examples/agentic/tictactoe/web_ui.py
  • python -m py_compile examples/agentic/tictactoe/game.py examples/agentic/tictactoe/run_agent.py examples/agentic/tictactoe/run_agent_no_tool.py examples/agentic/tictactoe/web_ui.py

@xsuler xsuler requested a review from adohe June 25, 2026 07:34
@xsuler xsuler self-assigned this Jun 25, 2026
@xsuler xsuler added the area/agentic Issues or PRs related to agentic RL, agent functions, and trajectories label Jun 25, 2026
@xsuler xsuler added this to the v0.0.3 milestone Jun 25, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a cartoon web UI (web_ui.py) for playing Tic-Tac-Toe against an OpenAI-compatible model, along with prompt refinements in game.py, run_agent.py, and run_agent_no_tool.py to clarify game rules for the agent. The review feedback highlights three key areas for improvement: adding thread synchronization to TicTacToeServer to prevent race conditions on shared state, robustly handling potential exceptions during JSON request parsing in _read_json, and using direct attribute access on the OpenAI SDK response instead of converting it to a dictionary.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/agentic/tictactoe/web_ui.py Outdated
Comment thread examples/agentic/tictactoe/web_ui.py
Comment thread examples/agentic/tictactoe/web_ui.py

@adohe adohe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@xsuler xsuler marked this pull request as draft June 25, 2026 07:43
@xsuler xsuler marked this pull request as ready for review June 25, 2026 07:49
@xsuler xsuler merged commit 7eb28d7 into main Jun 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agentic Issues or PRs related to agentic RL, agent functions, and trajectories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Tic-Tac-Toe agentic web UI

2 participants