google / google/codeworld

Check consistency of state in collaborations

Offen
#434 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Haskell
Sterne
1.3k
Forks
201
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

There remains one source of indeterminacy in game computations that we haven't thought about: incomplete specification of floating point operations. Many transcendental functions in floating point are only specified to plus/minus one ulp of precision. Furthermore, optimizations often cause intermediate floating-point results to retain extra precision in some cases, and not others. It's not clear to what extent these things will cause problems in real-world games.

There are several stages to this problem:

1. Confirm that it's really a problem. That would mean collecting data across many platforms and browsers about whether floating point arithmetic (including complex nested expressions) gives different answers. We could, in theory, do this for visitors to code.world, and collect divergences from a reference value in files on the server.
2. If it is a problem, find solutions. We can replace many transcendental math functions with deterministic variants (e.g., those at https://deterministic.js.org/; but keep in mind that we don't want to completely load deterministic.js, since it kills access to the system clock, among other things.)

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Keine Quelldatei oder kein Test ist genannt. Beginnen Sie mit code.world und der vorgeschlagenen serverseitigen Sammlung von Referenzwerten, wobei Gleitkommaergebnisse plattform- und browserübergreifend verglichen werden, einschließlich verschachtelter Ausdrücke. Als abgeschlossen gilt, festzustellen, ob Abweichungen auftreten, und falls ja, deterministische Mathematikvarianten wie deterministic.js zu evaluieren, ohne die gesamte Bibliothek zu laden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
haskell, javascript
Bereich
game-dev, web-dev
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.