Interpret bounded Truthtrance fact questions
Verify and publish checkpoint container / container (push) Successful in 10m38s

This commit is contained in:
Quintine committed 2026-10-29 04:31:15 +11:00
1 parent 88c0ab1547
commit 8ae275f598
16 files changed
+431 -31

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ export function TruthFactFields({ value: fact, game, target, onChange }: {
<option value="stormForecast">Known storm forecast</option>
<option value="spicePeek">Known next Spice Blow card</option>
<option value="auctionPeek">Inspected ordinary auction card</option>
<option value="cacheLot">Public Basic Richese cache auction card</option>
<option value="cacheLot">Public Richese cache auction card</option>
<option value="ixPoolPeek">Recorded Ixian inspected auction pool includes a card</option>
<option value="presciencePeek">Inspected battle plan field</option>
<option value="spice">Current personal spice</option>
+2 -2
View File
@@ -75,12 +75,12 @@ export function KnowledgeFactFields({
) : value.kind === 'cacheLot' ? (
<>
<label>
Public Basic Richese cache auction card
Public Richese cache auction card
<select value={value.name} onChange={(event) => onChange({ kind: 'cacheLot', name: event.target.value })}>
{TRUTH_CARD_NAMES.map((name) => <option key={name} value={name}>{name}</option>)}
</select>
</label>
<p className="fine">This asks about the current public Richese cache auction card in Basic play. If that auction is unavailable, the answer is I don’t know. Only the answer is published.</p>
<p className="fine">This asks about the current public Richese cache auction card. If that auction is unavailable, the answer is I don’t know. Only the answer is published.</p>
</>
) : value.kind === 'auctionPeek' ? (
<>
+16 -7
View File
@@ -64,6 +64,7 @@ import { useId, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { CHEAP_HERO_TRAITOR } from '@/game/traitors';
import { parseFreeformFactV1 } from '@/game/truthtrance-freeform-facts';
import {
truthQuestionText,
type TruthFact,
@@ -352,6 +353,9 @@ export function Truthtrance({
{w.question && (
<blockquote>
<p>{truthQuestionText(w.question, leaderName, locationName, name)}</p>
{w.question.kind === 'freeform' && w.question.interpreted && (
<p className="fine">Checked as: {truthQuestionText({ kind: 'fact', target: w.question.target, fact: w.question.interpreted.fact }, leaderName, locationName, name)}</p>
)}
<p className="fine">Asked of {name(w.question.target)}</p>
</blockquote>
)}
@@ -556,7 +560,7 @@ export function Truthtrance({
elements remain yours to choose.
</p>
</>
) : w.question!.kind === 'fact' ? (
) : w.question!.kind === 'fact' || w.question!.kind === 'freeform' && w.question!.interpreted ? (
<>
<p className="notice">
Your current game information establishes:{' '}
@@ -943,12 +947,17 @@ export function Truthtrance({
placeholder="Will you ship at least six forces to Carthag this turn?"
/>
</label>
<p className="notice">
Freeform answers rely on the players. Automatic checks for
arbitrary promises are unfinished. AI can answer structured
fact, supported shipment and battle-plan questions; it
cannot yet interpret freeform questions.
</p>
{scope === 'fact' && parseFreeformFactV1(text) ? (
<p className="notice" aria-label="Recognized freeform question">
This will be checked as: {truthQuestionText({ kind: 'fact', target, fact: parseFreeformFactV1(text)! }, leaderName, locationName, name)}
</p>
) : (
<p className="notice">
This wording is not automatically interpreted. Players must answer
facts truthfully; AI will answer I don’t know. Automatic checks
for arbitrary promises remain unfinished.
</p>
)}
</>
)}
{!['fact', 'battlePlan', 'futureBattleLeader', 'shipment'].includes(kind) && button(