All work

Guess Who?

2025ICS4U

A recreation of Guess Who?, the classic deuction game where you narrow down a hidden character question by question — played against an AI opponent. Built in Java for ICS4U with team Bytefang.

The assignment

ICS4U's final project was graded against two rubrics, not one. The first was the application (does it work?). The second was project managment: did four people actually run a project, or did they just write code until the due date.

Initiation

We started with a project charter: scope, deliverables, success criteria, and who owned what. Project charter is where we outlined the scope of the game; we were making a 1 player game against an AI opponent, not a MMORPG AI+ML B2B SaaS Neural Net Rotoscope. Scoping at the start is what made the AI worth building instead of an afterthought.

We also went back to the official printed rules and to an online implementation for reference, so "what does the game actually do on a tie, on an early guess, on a wrong guess" was settled before anyone touched VSCode.

Planning

The project's GANTT chart
The project's GANTT chart

Three deliverables came out of planning: a GANTT chart, a UML diagram, and written algorithms.

The GANTT chart mapped the build across the phases and made the dependencies obvious: Character had to exist before Board, Board before the AI, the AI before the GUI could be wired to anything real.

The UML diagram locked everything in: Character, Board, Player, ComputerPlayer extends Player, and GuessWhoGame. Agreeing on method signatures is what prevented (or rather, lessened the impact of) the dark art of merge conflicts.

The algoritms (specifically the AI's question-selection logic) were written out in plain English before being put to code.

The game

The board mid-game. Crossed-out tiles are ruled out characters.
The board mid-game. Crossed-out tiles are ruled out characters.

24 characters, each a Character object holding 15 boolean traits — glasses, moustache, bald, blond, tie, necklace, and so on. A character answers a question by mapping the question string onto the matching trait, so the question list and the character data stay in sync through one method.

The human always asks first. You may guess the character at any point, but you only get one try; useful if you're feeling lucky.

The AI

The interesting part. Before each turn the computer scores every remaining question by simulating it against every character still on its board — counting how many would answer yes, how many no, and taking the absolute difference.

The question with the smallest difference is the safest: the closest to a 50/50 split, guaranteeing roughly half the board falls no matter what you answer. The question with the largest difference is the riskiest: it might knock out a single character, or it might knock out everything else.

Then it rolls. Roughly 57% of the time it plays safe, 29% risky, and 14% it just picks at random. That last slice is deliberate — a purely optimal opponent is legible after two games, and legible is boring. The AI holds its guess until exactly one character remains, so it never loses to its own impatience the way a human player can.

Eliminations update on both boards, score accrues at 10 points per character knocked out and carries between sessions, and the winner screen reveals the bot's secret character along with which character it thought you were.

Closing

GuessWho winner!
GuessWho winner!

We closed the project properly rather than just submitting it: a closing checklist to confirm every deliverable was actually handed in, and a lessons-learned document written as a team.

The honest lessons were about estimation. The GUI wiring took far longer than the GANTT gave it, because every class boundary we'd drawn cleanly on the UML needed a dozen small adapters to talk to Swing. And the AI, which we'd flagged as the scary unknown, came in close to on time — the risk we'd named was the one we managed well.

Let's build
something

Up for a side quest? Let's get in touch.