Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEAST — Drivers Education And Safety Training

A spaced-repetition driving scenario trainer using Prolog, designed for use with BeamNG.drive (sold separately).

Status: Alpha / Pre-release — Use at your own risk. See Disclaimer below.

A personal project. I built DEAST for my own use, alongside my own simulator practice. It is published in case someone else finds it useful, not as a product. There is no support, no roadmap, and no commitment to maintain it. See the disclaimer before using it for anything.

What Is This?

DEAST applies the same idea behind flashcard apps like Anki to driving education. You practice specific driving scenarios in a simulator, rate how well you did, and the system schedules your next review using a spaced repetition algorithm. Scenarios you struggle with come back sooner; ones you've mastered fade into the background.

Think of it as "Lichess for driving" — structured, deliberate practice for real-world driving skills.

How It Works

DEAST has three main pieces that work together:

1. The Scenario Knowledge Base (driving_kb.pl) contains a library of 48 driving scenarios organized into 8 categories (highway merging, adverse weather, emergency maneuvers, etc.). Each scenario has a difficulty rating, a description of what to practice, and a suggested BeamNG.drive map. The scenarios are generic driving education concepts — the kind of thing you'd find in any driver's ed curriculum — not proprietary content.

2. The Spaced Repetition Engine (spaced_rep.pl) implements the SM-2 algorithm (the same algorithm behind Anki and SuperMemo, originally published by Piotr Wozniak in 1990). When you rate your performance on a scenario from 1 (failed dangerously) to 5 (perfect), the engine calculates when you should practice it again. Poor performance means you'll see it again soon; strong performance pushes it further out. Over time, this focuses your practice on your weakest areas.

3. The Local Web Interface runs a small HTTP server on your own machine (localhost:8077 — never exposed to the network) and gives you a browser-based dashboard to browse scenarios, run review sessions, and track your progress. Your data is stored locally in JSON files — there are no accounts, no cloud sync, and no telemetry.

The typical workflow:

  1. Launch DEAST (it opens a local web server)
  2. Open http://localhost:8077 in your browser
  3. The dashboard shows which scenarios are due for review
  4. Pick a scenario — DEAST tells you which BeamNG.drive map to load and what to practice
  5. Switch to BeamNG.drive with your steering wheel (and optionally VR headset) and run the scenario
  6. Come back to DEAST and rate your performance (1–5)
  7. DEAST schedules your next review and suggests the next scenario

DEAST does not directly control or communicate with BeamNG.drive. It is a companion tool: you use DEAST to decide what to practice, then you set up the scenario manually in BeamNG.drive, then you come back to DEAST to log your results.

Features

  • Spaced Repetition Engine: SM-2 based algorithm adapted for driving scenario review scheduling
  • Scenario Knowledge Base: Prolog-based KB of 48 categorized driving scenarios across 8 categories
  • Local Web UI: Browser-based dashboard on localhost for scenario selection, session logging, and progress tracking
  • Cross-Platform: Runs on Windows 10/11 and Linux from the same source
  • Fully Offline: Everything runs locally — no accounts, no cloud, no telemetry, no network exposure

Requirements

  • Windows 10/11 or Linux (Debian/Ubuntu, Fedora, Arch, etc.)
  • SWI-Prolog 9.x or later
  • BeamNG.drive (purchased separately via Steam — see Third-Party Notice)
  • A force feedback steering wheel (Logitech G923 recommended, others supported by BeamNG.drive)
  • VR headset (optional)

Installation

Linux (primary development platform)

sudo apt install swi-prolog          # Debian/Ubuntu/Pop!_OS
git clone https://github.com/aindilis/deast.git
cd deast
make install                          # installs to /usr/local
deast                                 # starts the server

Then open http://localhost:8077.

A Debian package is attached to each release:

sudo dpkg -i deast_1.0.0_all.deb
sudo apt-get install -f               # if swi-prolog is not yet present
deast

To run without installing, from a clone:

swipl src/prolog/server.pl

Running in a container or VM: the server binds to localhost inside its own host and is reached from outside through a port forward. The web UI uses same-origin relative paths, so it works at whatever address serves the page — localhost, an IP, or a forwarded port — with no configuration.

Windows

Windows — Installer

Download the latest .exe installer from Releases. The installer will:

  1. Install DEAST files to C:\Program Files\DEAST
  2. Check for SWI-Prolog and prompt you to install it if missing
  3. Create Start Menu shortcuts and a desktop shortcut
  4. Set up the local web server launcher

Linux — Debian Package

sudo dpkg -i deast_1.0.0_all.deb
deast

Linux — Make Install

git clone https://github.com/aindilis/deast.git
cd deast
sudo make install
deast

Any Platform — Run From Source

git clone https://github.com/aindilis/deast.git
cd deast
# Windows:
src\scripts\start-deast.bat
# Linux/macOS:
./src/scripts/start-deast.sh

Then open http://localhost:8077 in your browser.

Scenario Categories

  • Basic Vehicle Control: Parking, low-speed maneuvering, mirror usage
  • Highway Driving: Merging, lane changes, highway speed management
  • Adverse Weather: Rain, fog, snow, ice, hydroplaning recovery
  • Night Driving: Limited visibility, glare management, rural roads
  • Emergency Maneuvers: Emergency braking, obstacle avoidance, skid recovery
  • Intersection Navigation: Right-of-way, unprotected turns, roundabouts
  • Defensive Driving: Following distance, scanning, anticipating hazards
  • Special Situations: School zones, construction zones, emergency vehicles

Running Tests

make test

Requires SWI-Prolog. Tests cover the spaced repetition algorithm, the storage layer, and the scenario knowledge base. See the tests/ directory.

Architecture

DEAST
├── src/prolog/             # Core Prolog engine (cross-platform)
│   ├── driving_kb.pl       # Scenario knowledge base
│   ├── store.pl            # Persistent state (XDG on Linux, %APPDATA% on Win)
│   ├── spaced_rep.pl       # SM-2 spaced repetition algorithm
│   └── server.pl           # HTTP server on localhost:8077
├── src/web/                # Local web interface
│   ├── index.html          # Main dashboard
│   └── static/
│       ├── app.js          # Frontend logic
│       └── style.css       # Styling
├── src/scripts/            # Platform launcher scripts
│   ├── start-deast.bat     # Windows launcher
│   └── start-deast.sh      # Linux/macOS launcher
├── tests/                  # PL-Unit test suite
├── installer/              # NSIS installer script (Windows)
│   └── deast.nsi           # Builds DEAST-Setup.exe
├── linux/                  # Linux packaging files
│   └── deast.desktop       # XDG desktop entry
├── Makefile                # Linux: make install, make deb, make nsis, make test
└── docs/                   # Documentation

Building Distributables

Both deliverables are built from the same source tree on Linux:

# Build Windows installer (.exe)
sudo apt install nsis
make nsis
# -> installer/DEAST-Setup.exe

# Build Debian package (.deb)
make deb
# -> build/deast_1.0.0_all.deb

# Or just install directly on Linux
sudo make install

Disclaimer — READ BEFORE USE

This is not a driver training program

DEAST must not be used to learn, practice, or improve real-world driving skills. It is an experimental scheduling tool for simulator play, and it is not ready for, or intended for, driver education of any kind.

DEAST is an unofficial personal project. It is not a product, not affiliated with or endorsed by any driving school, licensing authority, vehicle manufacturer, government body, or the makers of any simulator it mentions, and it has not been reviewed, validated, or approved by any certified driving instructor, road safety organisation, or subject matter expert of any kind.

The scenario descriptions are prompts, not instructions

This is the most important thing on this page.

Each of the 48 scenarios carries a one-line description such as "practice recovering from a rear-wheel skid" or "practice threshold braking on a low-friction surface." These name a topic. They do not describe how to perform anything, and they are not abbreviated techniques.

A partial description of a driving technique is more dangerous than no description at all, because a reader will unconsciously fill in the missing steps and will not know they have done so. Several of these scenarios refer to manoeuvres that are genuinely hazardous when attempted without qualified supervision, and the correct technique for many of them depends on the specific vehicle, its drivetrain, its stability and braking systems, the surface, the load, and the conditions — none of which this software knows anything about.

Do not infer a technique from a scenario name. Do not treat these descriptions as guidance. If you want to learn any manoeuvre named here, learn it from a qualified instructor in a controlled environment.

Never practise these on a public road

Every scenario in this knowledge base is intended for a simulator only. The Emergency Manoeuvres category in particular — hard braking, skid recovery, evasive steering — describes situations that must never be deliberately attempted on a public road, and that should only ever be practised in a vehicle on a closed course under professional supervision.

Simulator skill is not driving skill, and may be worse than none

Skills that appear to transfer from a simulator often do not. A simulator cannot reproduce the physical forces, the risk, the consequences, or the peripheral awareness of real driving, and simulator practice can produce overconfidence — a driver who believes they have practised an emergency manoeuvre and has not. This is a known hazard, not a hypothetical one.

The scheduling means nothing about your competence

The SM-2 algorithm schedules review intervals from a self-assigned rating between 1 and 5. It is a spacing heuristic borrowed from flashcard software. It has not been validated for motor skill acquisition, it does not measure anything, and it is not an assessment. A high easiness factor is a statement about your own self-ratings and nothing more. It does not mean you are competent at anything, and it must never be treated as evidence that you are.

Traffic law varies

Scenario content is generic and does not reflect the traffic law, licensing requirements, road conventions, or driver education curriculum of any particular jurisdiction. Always follow the law where you are driving.

Warranty and liability

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See sections 15 and 16 of the GNU General Public License v3 for the full disclaimer of warranty and limitation of liability.

To the maximum extent permitted by applicable law, the author accepts no liability for any loss, injury, death, or damage arising from the use or misuse of this software, from reliance on anything it displays, or from any action taken or not taken on the basis of its output. You use it entirely at your own risk, and you are solely responsible for your own conduct in a vehicle.

Development status

Alpha, pre-release, under active development. The unit test suite covers the scheduling engine, the store, and the knowledge base; the full application workflow has not been validated across configurations. The Windows installer and batch launcher follow standard practice but have received limited testing on Windows — the primary author develops on Linux. The installer writes only to its own Program Files directory, creates standard Add/Remove Programs registry entries, and makes shortcuts; it does not modify system DLLs, drivers, PATH, or other system-wide settings. Please report bugs via Issues.

Third-Party Notice

BeamNG.drive is a registered trademark of BeamNG GmbH. DEAST is an independent, community-created project and is not affiliated with, endorsed by, or sponsored by BeamNG GmbH. BeamNG.drive must be purchased separately. Map names referenced in the scenario knowledge base (west_coast_usa, gridmap_v2, italy, etc.) are BeamNG.drive asset names used here solely for identification purposes.

SWI-Prolog is developed by the SWI-Prolog team and distributed under the BSD-2 license. DEAST is not affiliated with the SWI-Prolog project.

SM-2 Algorithm: The spaced repetition algorithm used in DEAST is based on SM-2, originally published by Piotr Wozniak (1990). This is an independent reimplementation in Prolog based on the published algorithm description.

Logitech and G923 are trademarks of Logitech International S.A. Mentioned here for hardware compatibility identification only.

AI-Assisted Development

Portions of this codebase were generated with assistance from Claude (by Anthropic). All generated code was reviewed and is released under the project's GPL-3.0 license by the project author.

Part of FRDCSA

DEAST is a component of the FRDCSA ecosystem — specifically the driving safety training subsystem. It can operate fully standalone or integrate with the broader Free Life Planner framework.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Contributing

Issues, scenario contributions, and PRs welcome. See CONTRIBUTING.md.

Author

Andrew J. Dougherty (@aindilis)

About

Spaced-repetition scheduler for driving simulator practice. SWI-Prolog + local web UI. Alpha — not a driver training tool.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages