Students build and iteratively improve their team's tactics with IF/THEN rules, watch their team
get better, and compete in a class cup. Run it as a short intro or as an ongoing project.
๐ One session or a multi-session project๐ฆ Ages 10โ14๐ป Browser, nothing to install๐ Free ยท no student email
In Tactics, students don't control the players โ they program them with
IF (condition) THEN (action) rules. The heart of the project is the loop: test โ watch the replay โ
improve a rule โ test again. Students literally see their team play better as their logic gets better, and
when the teams are ready the class cup begins.
What students learn
Conditionals: IF (condition) THEN (action).
Boolean logic: And / Or / Not when combining conditions.
Rule order / priority: the first rule that matches wins โ changing the order changes the behaviour.
Debugging & iteration: observe the replay, form a hypothesis, change one thing, test the result.
What you need
One device per student or per group (phone, tablet or laptop with a browser).
Your teacher account with a verified email (only the teacher needs this, to create the cup).
A few minutes to create the cup and note the code.
Students sign in without email: just a username, a password and the code.
How to organise the class: individual or in groups
The cup is a round-robin (everyone plays everyone), so the number of matches grows fast with the number
of teams. To keep the tournament manageable, aim for few teams (6โ10).
Teams in the cup
Matches (round-robin)
6
15
8
28
15
105
30
435
Individual mode (1 team per student): best for small classes (โ6โ12) or independent students.
Group mode (3โ4 students share a team): best for large classes and for teamwork. Each group uses one
account/login and collaborates on the tactics. Fewer teams = a playable tournament.
Limits: max 30 members per cup; a student can be in up to 5 cups. If your class is over 30
(individual mode), create 2 cups. Rule of thumb: aim for 6โ10 teams per cup (a class of 30 in group mode
โ 8 groups = a perfect tournament).
The project in three phases
Phase 1 ยท Get started (โ 1 session)
Goal: every student/group has a team that plays.
On the board, introduce the idea: "You don't move the players โ you write their instructions." Teach IF (condition)
THEN (action) with a football example. Ask the hook question: "Does the order of the rules matter?"
Students sign up with username + password + cup code (no email), create a team (7 players) and position them.
They write a first simple tactic and assign it to all 7 players (a tactic can be shared). They run an Autotest
against a system team and watch the replay.
Phase 2 ยท Improve โ the heart of the project (1+ sessions)
This is where the learning happens, and it can span several classes. Students repeat the loop:
test โ watch the replay โ find a weakness โ change a rule or its order โ test again
Give milestone challenges so progress is visible and motivating:
Make the striker shoot only when in range; otherwise advance.
Add a goalkeeper with a different tactic.
Add passing when a teammate is ahead.
Manage energy: don't run non-stop (running tires the player and slows it down).
Give each player a role-specific tactic.
Beat the medium, then the hard system team.
Students test against system teams and challenge each other in friendly matches, refining their logic each time.
Phase 3 ยท The cup (when teams are ready)
When you decide the teams are ready, start the cup. Everyone is already in it (they joined with the
code). The round-robin plays out and standings update automatically.
Watch key matches together. Discuss: "Which tactic won and why?" (usually the one that decides best, not the most complex).
Wrap-up: swap two rules' order live and show how the behaviour changes โ that's exactly how a program works.
Only have one hour? Run a condensed single session: ~10 min concept ยท ~10 min sign up
+ team ยท ~25 min build & test one tactic ยท ~15 min cup. You lose the deep iteration of Phase 2, but it still works as a taster.
Starter / solution tactic (for the teacher)
A simple striker students can start from and improve. Rules are evaluated top to bottom; the first that matches wins:
IF (IHaveBall And IAmInShootingRange) โ Shoot
IF (IHaveBall) โ RunTowardsOpponentGoal
IF (IAmNearestToBallInMyTeam) โ RunTowardsBall
ELSE โ WalkHome
The teaching gem: if you put RunTowardsBallbeforeShoot,
the striker never shoots (it always chases the ball). Order matters.
Improvements to challenge them with: passing โ
IF (IHaveBall And AnyTeammateAhead) โ PassToAheadTeammate; goalkeeper โ
IF (BallIsNearMyGoal) โ RunTowardsBall; ELSE โ WalkTowardsMyGoal; steal โ
IF (IAmNearOpponentWithBall) โ Steal (an attempt โ it doesn't always succeed).
Conditions and actions (reference)
Conditions (a selection): IHaveBall, MyTeamHasBall, IAmNearestToBall, IAmNearestToBallInMyTeam,
IAmInShootingRange, IAmNearToOpponentGoal, AnyTeammateAhead, IAmNearOpponentWithBall, BallIsNearMyGoal,
MyTeamIsWinning/IsLosing, MyEnergyIsHigh/Medium/Low, LessThan20SecsLeft. Combine with And, Or, Not.
Actions (a selection): Shoot, ShootAndRun, PassToAheadTeammate, PassToNearestTeammate, Cross, Steal,
RunTowardsBall, RunTowardsOpponentGoal, WalkHome, WalkTowardsMyGoal, RunOpponentHalf, Stay (plus walk/run variants in the 4 directions).
Assessment ideas
What is a condition? Give an example from your tactic.
Why does the order of the rules change the behaviour? Give a case.
Show two versions of your team and explain what you changed and why it improved (this is the core skill: iteration + debugging).
Combine two conditions with "And" and explain when it is true.
Privacy & FAQ
No minors' data: students sign in with just a username and password, no email. GDPR-friendly.
Free, in the browser, nothing to install. Languages: English, Spanish and Portuguese.
If a student forgets their password, the teacher (cup organiser) can reset it from the cup management screen.
Fits the Hour of Code (December) as a proposed activity or project.