Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Prototype a Chess Opponent Powered by a Language Model

Overview

Have Devin build a small browser chess game in which a language model chooses the computer's moves, with the code checking every move for legality before it is played.

Problem or Objective

More in Games and Simulations

AI Agents and Models

Tools and Integrations

Prerequisites
Requires a Devin account (Individual and Teams plans are available), a code repository connected to it, and an API key from a language-model provider for real games.

How It Works

Create an empty repository and connect it to Devin. In the first session, ask only for the board: a web page where a person can play both sides, with move validation from an established chess rules library, plus tests and a working local build. Review Devin's draft pull request, try the game yourself and merge it when it plays correctly. In a second session, ask Devin to add a computer opponent behind a simple interface: send the current position and legal moves to a language model, accept only a reply that is one of those legal moves, retry or fall back to a random legal move otherwise, and use a stub model in tests so no key is needed. Watch the demo in Devin's browser, review the second pull request, then add your own model API key locally and play a few games before sharing it.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Devin.
  2. Check the prerequisitesRequires a Devin account (Individual and Teams plans are available), a code repository connected to it, and an API key from a language-model provider for real games.
  3. Gather your detailsCollect what the prompt asks for: Repository connected to Devin, Side the model plays, Model provider you plan to use, Retries before a fallback move.
  4. Run the starter promptPaste the starter prompt below into Devin and adapt it to your case.
  5. Check against the documentationCompare what you get with the documentation at docs.devin.ai before you rely on it.

Practical Starter Prompt: Add a language-model chess opponent

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
In [Repository connected to Devin], the two-player chess board already works. Add a computer opponent for the [Side the model plays] pieces: send the current position and the list of legal moves to a model through an interface I can configure with [Model provider you plan to use], accept only a reply that matches a legal move, retry up to [Retries before a fallback move] times and then play a random legal move. Use a stub model in tests so no API key is needed. Run the tests, show the game in your browser, and open a draft pull request for my review; do not merge it.

Run this as a second session after the board itself is merged. Review and test the draft pull request before merging, and add your API key only on your own machine after the merge.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Devin's docs describe it as an AI software engineer that writes, runs and tests code, browses to test the web apps it builds, and returns draft pull requests for review; its guidance recommends clear success criteria and splitting larger work into smaller sessions. No cited page covers chess libraries or how well any language model plays, so expect the opponent's strength to vary.

Limitations and Considerations

Keep rule checking in code: a language model can suggest illegal or poor moves, which is why the entry accepts only moves from the legal list. Splitting the work into two sessions follows Devin's own advice for larger tasks. Keep your model API key out of the repository and add it only on your machine or in a secret store you control. Each model call costs money with most providers. Devin is offered on Individual and Teams plans. Results depend on your setup and were not independently reproduced by Top 200 Repos.

Sources

  1. Introducing Devin - Devin Docs (opens in a new tab)

    Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC

    What this source supports
    • Devin is an autonomous AI software engineer that can write, run and test code.
    • Watch Devin browse through documentation, test web applications it builds, download/upload information, and more.
    • Carving out tasks from your todo list at the start of your day and returning to draft PRs waiting for review.
    • Individual and Teams plans are available.
  2. When to Use Devin - Devin Docs (opens in a new tab)

    Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC

    What this source supports
    • For longer tasks, break them into smaller sessions.
Report a problem

More with Devin

Planned, not done

Remove Obsolete Feature Flags Through Tested PRs

Ask Devin to remove one retired feature flag at a time, run the tests and open a pull request that you check against CI and your own flag records before merging.

docs.devin.ai
Planned, not done

Delegate Small Code Defects to Devin With Clear Scope

Hand Devin one narrowly scoped bug at a time, with steps to reproduce and a test that defines done, and review the pull request it opens before anything merges.

docs.devin.ai
Planned, not done

Implement a WordPress Marketing Site From a Figma Design

Connect Devin to Figma through an MCP integration and have it build a WordPress theme for a marketing site page by page, checking its work in its own browser and returning pull requests for review.

docs.devin.ai

View all: Devin