- commit
- b66f64a6cf3959280a20f3e243712f0c67742310
- parent
- aa2dd90cb58d270d4bfae81001224a600fd83eaf
- author
- dami <gazey55@gmail.com>
| M | site/ | 12 | +++++++++++- |
@@ -432,7 +432,17 @@ while (obs.status !== "solved" && batches < MAX_BATCHES) {
432432 intent =433433 `tile #${tile.id} (${label}): ${sols.length} solutions disagree on ${disputed.length} cells, guessing one`;434434 }435- const r = await write("commit", { cells: batch, intent });435+ let r: any;436+ try {437+ r = await write("commit", { cells: batch, intent });438+ } catch (e) {439+ // the cells were filled meanwhile (shared cells, another agent): observe440+ // again and continue441+ if (!String(e).includes("No cell to process")) throw e;442+ obs = await observe();443+ learn(obs);444+ continue;445+ }436446 batches++;437447 for (const rej of r.rejected) {438448 const v = batch.find(([id]) => id === rej.id)![1];