Adaptive Decision Engine: Beacon Keep - Internet Explorer
Address
https://freetolearn.world/adaptive-decision-engine.html
free to learn.world
← Course Directory

Terminal project · 10 units · Free

Adaptive Decision Engine: Beacon Keep

Help a twelve-round expedition survive long enough to light its beacon. Build the part of the game that chooses what the player faces next.

Get the course on GitHub

Lesson 1 · Read the last three rounds

Welcome to Beacon Keep. In this game, an expedition has twelve rounds to gather enough charge to light a beacon. Lose all your health and the expedition ends. The director is the part of the game that chooses the next challenge.

Two players each have six health points left. One lost three health points in the last three rounds. The other took none. Which player needs a breather? Your first job is to give the director enough recent history to tell them apart without letting it see the next hit in advance.

In Lesson 1, observe(state) uses past rounds to measure pressure on the player, just as you’ll use past trips below to choose a fuel route and spot a change in its success rate.

Interactive 3D · Field experiment

Which path brings fuel home?

Two paths lead to fuel for the beacon. You can send six rested or tired crews down one path. Each crew brings back fuel or comes home empty. Only trips you send give you evidence.

Each post shows the share of trips that brought fuel home. The capped line beside it marks a confidence interval, a range of success rates consistent with those trips. A longer line means more uncertainty.
Ridge15 of 18 trips brought fuel home.
Marsh2 of 5 trips brought fuel home.

Which path would you send six crews down? Use the leader sends them down the path with the higher observed rate (exploitation). Try the other path tests its rival (exploration). Compare how the two ranges change.

Flood the ridge makes that path harder for future crews. A drift warning means the new trip records look different from the original ones. Flood the ridge, then send crews there and watch for a warning.

Choose a crew condition and send your first six crews. Start over restores the original trip records.

How to read the evidence

Choosing a path using the crew’s condition and learning only the chosen path’s outcome is a contextual bandit. Each post uses the latest 24 trips on its path for that crew, or all trips if there are fewer. These simulated trips use the same sequence each time you start over.

Each range uses the 95% Wilson method. Across many fixed-size samples from an unchanged path, about 95 in 100 such ranges would cover its true chance of success. A drift warning flags a possible change when the range for the latest 12 new trips stops overlapping the range for the original trips. Repeated checks can raise a false alarm.

What you’ll learn
Use causal observations to make decisions using only past rounds, never peeking ahead. Choose moves the game allows, judge uncertainty and set deadlines and decision budgets (limits on how many requests the director can make).
Your project
Your own director for the supplied Beacon Keep game, evaluated on paired expeditions.
How you’ll work
Clone the JavaScript project and reader from GitHub. Start with rules and offline fixtures (sample replies you can test on your computer).

What you’ll build

  • Write a rule that gives a player a rest after a run of damaging rounds.
  • Check that a reply belongs to the current round and decide when to fall back on your rule.
  • Run two directors through the same expeditions and compare how often their players light the beacon.

Before you start

You’ll use JavaScript functions, arrays, objects, ES modules and async/await, plus fractions and averages.

Use Git to get the project and Node.js to run it. The game, automated players and sample replies are included, so you can run the expeditions offline.

Clone and start the terminal project

In your terminal, download the course, create your work folder and check the starter code.

git clone https://github.com/itsHabib/free-to-learn.git
cd free-to-learn
git checkout da6e69a94c9f1c62fd3aec36954205bf3dd6e81f
cd courses/adaptive-decision-engine
node lab.mjs start work
node lab.mjs check 01 work --help-used none

The first check shows which function you still need to write. Implement observe(state) in work/observe.mjs, then run the check again. If you used the lesson, change --help-used none to --help-used lesson.

When you move computers, export your project as a ZIP and restore it in a new folder. The export keeps the code and prediction from each attempt, including the ones that failed.

Browse the pinned learner source · Reuse terms and attribution

Give site feedback →

Course overviewInternet
Mission.txt - Notepad

Learning without paywalls.

Find what people pay to learn.
Build a great course. Give it away.

One course at a time.

Usage & privacy

Start