Workshop · JavaScript × Reversi Elementary & up

Build a
Reversi AI. Build a Reversi AI stronger than yourself, with your own hands, in JavaScript.
Translate the "way of thinking" behind board-evaluation values into code, then pit your AIs against each other.

  • No experience writing JavaScript required.
  • Reach an AI stronger than yourself in just 1–2 hours.
  • Put your "gut feeling" into words as an evaluation function.
0hrs
to an AI stronger than you
JS · 1 lang
JavaScript is all you use
0+ runs
sessions since 2018
Build a Reversi AI — workshop key visual Write an AI, in JS
Reversi AI class at Tohoku University; participants working at laptops AIs face off
01 about

In JavaScript, build an AI stronger than you.

In the end, every AI faces off to decide the strongest Reversi AI of all.
Reversi is such a simple game that even beginners can reach an AI "stronger than themselves" in no time.

In "Build a Reversi AI," you use the programming language JavaScript to create a "Reversi AI" stronger than yourself. At the end, each Reversi AI is pitted against the others to see whose is strongest.

It may sound hard, but Reversi is such a simple game that in about 1–2 hours you can build, all by yourself, a Reversi AI stronger than "you".

Diagram of the Reversi AI build process, from tuning board-evaluation values to AIs facing off.
How you build the AI
02 thinking in code

Translating "gut feeling" into code.

Make your board-game intuition explicit as an evaluation function.
Time spent putting your own "way of thinking" into words through a programming language.

When a move in Reversi feels like "I want to play here," why does it feel that way? Corners are strong, edges are risky, you want to cut down your opponent's options — one by one, you turn those instincts into numbers as board-evaluation values and write them out as a function.

Just changing the numbers changes how strong the AI is. Through trial and error, the "gut feeling" inside you is gradually replaced by executable logic.

Conceptual diagram: putting a player's thinking into a programming language and strengthening it through feedback.
Writing the evaluation values
+ achievement

Even elementary schoolers, in 2 hours,
can build a Reversi AI stronger than themselves.

Even participants with no programming background can enter the AI-vs-AI showdown by the end of the session.
They get this far with nothing but a worksheet and a minimum of JavaScript.

0hrs
to an AI stronger than you
0lang
JavaScript is all you use
Elem. & up
recommended (teens welcome too)
Workshop flow diagram: from putting intuition into words to AI battles.
Workshop flow: review the rules of Reversi → put evaluation values into words → turn them into JavaScript functions → AIs face off.
03 voices

Participants' voices.

Quoted verbatim from post-workshop surveys.

High school · Y1
I'd always pictured programming as something only really clever people did, clattering away at a keyboard, so it really stuck with me to realize that even I could do it. At first I hated that nothing but odd ideas came out of me, but as we neared the end I gradually came to feel that they had actually been pretty important ideas!
Workshop participant · high school
Junior high · Y1
I was surprised that when placing a piece in Othello, pros see it in terms of numbers. And I thought it was amazing how you feed those numbers into the AI as a function, and just by changing the numbers the AI's strength changes.
Workshop participant · junior high · y1
Junior high · Y2
Tinkering with the board-evaluation values myself and figuring out through trial and error how to make an ever-stronger program. I also found it fascinating to talk about how, in an age where deep learning is accelerating and we increasingly just accept the results without knowing what the AI is actually doing, the very idea of "learning" may be changing.
Workshop participant · junior high · y2
04 try it

Play it right now.

Take on the actual Reversi AI right in your browser.
We publish the whole package: how to read the code, what the board-evaluation values mean, and how to build the AI.

A Reversi AI demo that runs in your browser.

In the demo app published by Accel Kitchen (加速キッチン), you can take on the very Reversi AI built in the workshop, with your own hands. The code is right there to read, so you can see exactly which evaluation function drives the AI.

  • Runs in the browser alone (no install needed)
  • Read the evaluation function's source code as-is
  • Steps for customizing the AI are gathered on the same page
Open the demo app → external
Screenshot of the Reversi AI demo app, showing match settings, the board, and the AI source code side by side.
+ materials

The worksheets we use.

Participants work through it hands-on, alongside a paper worksheet.
They write in evaluation values, reflect them in code, and record the AIs' match results.

Worksheet example 1: fields for writing in board-evaluation values
① Fill in the evaluation values.
Worksheet example 2: space for transcribing the JavaScript function
② Transcribe them as a function.
05 history

Our track record so far.

Since 2018, we've run it in all kinds of settings — schools, universities, companies, online camps, and more.