GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TiltTek/predictions: Let members forecast dated event outcomes, like a final, and reward right or well-calibrated picks in points, paid once, with no stakes and no money.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
doc
doc
 
 
src
src
 
 
tests/Unit
tests/Unit
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.fr.md
README.fr.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
composer-dependency-analyser.php
composer-dependency-analyser.php
 
 
composer.json
composer.json
 
 
phil-dev.php
phil-dev.php
 
 

Repository files navigation

tilttek/predictions

Predictions on dated outcomes of events, settled in points: nothing staked, and a wrong pick costs nothing.

tilttek/predictions lets an application ask its members a question about a dated outcome — who wins the final, whether the campaign ends by its deadline —, take their picks until the deadline, and pay the right ones in points of tilttek/points once it declares the outcome. A question is scored by choice — the member picks one outcome, and a right pick earns the question's points —, or by probability: the member gives each outcome a probability, and earns a share of the points that grows as the Brier score of their forecast falls, which rewards calibrated confidence rather than a bold guess.

Nothing is ever staked, not even in play money: a member never gives points to predict, and the library holds no market and no odds. A question is about an outcome of an event the application declares, never about a person: its outcomes are the application's keys of the event's results, which cannot be a member's reference.

The settlement is paid once, whatever happens: each prediction's points are written under a key built from its random identifier, which the ledger writes once, so that a settlement run again, or by two processes at once, pays nothing twice; a cancelled question pays nothing. Erasing a member deletes their predictions.

It is for a community that wants friendly forecasts on its finals, contests and campaigns without turning them into betting. It is a plain PHP library whose dependencies are tilttek/points, phil/resource and psr/clock.

Status

Part State
Predictions: ask, predict until the deadline, resolve, settle, cancel, read, erase Implemented and tested
Question, Pick, Prediction, Brier, Settlement Implemented and tested
Contract\PredictionStore, with Store\InMemoryPredictionStore Implemented and tested
A store on Doctrine DBAL, and a Symfony bundle Not started
Tournament brackets filled in ahead Not started

Documentation

Document What it covers
Installation Requirements, installing and wiring.
Asking and settling Questions, picks, the deadline, scoring, the settlement paid once, cancelling, erasing.
Scoring Choice and probability, the Brier score in whole numbers, worked values.
Extension points The store, the currency, the source and the batch size.
Exceptions PredictionsException and its exceptions, with their messages.
Testing The library's tests, and testing code that asks questions.
Reference Every public type, with its role.

Quick start

composer require tilttek/predictions
use Tilttek\Predictions\Pick;
use Tilttek\Predictions\Predictions;
use Tilttek\Predictions\Store\InMemoryPredictionStore;

$predictions = new Predictions(new InMemoryPredictionStore(), $points, $clock);

$predictions->ask('final:2026', ['home', 'away'], new DateTimeImmutable('2026-12-05 19:00 UTC'), 50);
$predictions->predict('final:2026', $member, Pick::choice('home'));
$predictions->resolve('final:2026', 'home');    // 50 points to each right pick, once

Requirements

PHP 8.5 or later.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Tilttek project. See LICENSE.

About

Let members forecast dated event outcomes, like a final, and reward right or well-calibrated picks in points, paid once, with no stakes and no money.

Topics

brier-scorecommunityforecastinggamificationphppointspredictionstilttek

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.