- commit
- 7974f99327ffbd3b6083138fdcc124812c9724bd
- parent
- fe6fa7c33d91742639cafe2bcf9b843bdee547a2
- author
- dami <gazey55@gmail.com>
| M | site/ | 23 | +++++++++++++++++++---- |
| M | site/ | 5 | +++++ |
@@ -1156,7 +1156,7 @@ export default function Viewer(
11561156 const [playing, setPlaying] = useState(false);11571157 const [speed, setSpeed] = useState<Speed>(4);11581158 const [follow, setFollow] = useState<string>("");1159- const [tab, setTab] = useState<Tab>("moves");1159+ const [tab, setTab] = useState<Tab>("table");11601160 const [sheet, setSheet] = useState(false);11611161 const [drawInfo, setDrawInfo] = useState({11621162 redrawn: 0,@@ -1595,7 +1595,7 @@ export default function Viewer(
15951595 <>15961596 {atEnd && <ResultCard boards={boards} day={day} />}15971597 <div class="tabs">1598- {(["moves", "tile", "table"] as Tab[]).map((t) => (1598+ {(["table", "moves", "tile"] as Tab[]).map((t) => (15991599 <button16001600 key={t}16011601 type="button"@@ -1938,7 +1938,14 @@ function TournamentTable(props: { boards: Boards }) {
19381938 <tr key={r.key}>19391939 <td class="n">{i + 1}</td>19401940 <td class={r.dead > 0 && r.dead >= r.agents ? "dead" : ""}>1941- {r.key}1941+ {r.name ?? r.key}1942+ {r.name1943+ ? (1944+ <span style="color:var(--muted);font-size:0.8em">1945+ {` ${r.key}`}1946+ </span>1947+ )1948+ : null}19421949 {r.models.length > 119431950 ? (19441951 <span style="color:var(--muted)">@@ -1946,7 +1953,15 @@ function TournamentTable(props: { boards: Boards }) {
19461953 </span>19471954 )19481955 : null}1949- {r.dead > 0 ? <span class="danger"> (timeout)</span> : null}1956+ {r.dead > 0 && r.dead >= r.agents1957+ ? <span class="danger"> (timeout)</span>1958+ : r.dead > 01959+ ? (1960+ <span style="color:var(--muted)">1961+ {` (${r.dead} of ${r.agents} timed out)`}1962+ </span>1963+ )1964+ : null}19501965 </td>19511966 <td class="n">{r.tiles}</td>19521967 <td class="n">{r.reward}</td>@@ -8,6 +8,7 @@ import type { AgentInfo, State } from "./fold.ts";
88 99 export type Row = {1010 key: string; // the model, or the user11+ name?: string; // by user: the display name when the key is a machine id1112 reward: number; // cells solved1213 tiles: number;1314 forced: number;@@ -90,6 +91,10 @@ export function boardsOf(s: State): Boards {
9091 const row = map.get(key) ?? emptyRow(key);9192 row.agents++;9293 addTo(row[list], other);94+ // by user: a machine id keys the row; the agent's name is what to show95+ if (list === "models" && a.name && a.name !== key && !row.name) {96+ row.name = a.name;97+ }9398 if (an) {9499 row.reward += an.reward;95100 row.tiles += an.tiles;