Code Snippet 9b150581
From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-06-06.)
Code Snippet 9b150581 has 6 facts recorded in Dontopedia across 1 reference, with 1 live disagreement.
Mostly:defines variable(2), rdf:type(1), is written in language(1)
Maturity scale
raw canonical shape-checked rule-derived certifiedOther facts (6)
The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.
| Predicate | Value | Ref |
|---|---|---|
| Defines Variable | White Queens Variable | [1] |
| Defines Variable | Black King Variable | [1] |
| Rdf:type | Source Code | [1] |
| Is Written in Language | python | [1] |
| Has Text Content | from typing import Tuple def is_checkmate(white_queens: Tuple[Tuple[int, int], ...], black_king: Tuple[int, int]) -> bool: king_x, king_y = black_king # Directions king can move directions = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)] def under_attack(x: int, y: int) -> bool: for qx, qy in white_queens: if qx == x or qy == y or abs(qx - x) == abs(qy - y): # Check if no blocking pieces between queen and position # For this simulation, we assume empty board except king and queens # But the king itself is the only black piece and can't block # So queen attacks all straight and diagonal lines # since the problem is simplified, no blocking checks needed return True return False # Check if the king is currently in check if not under_attack(king_x, king_y): # If king not under attack, then not checkmate return False # Check all squares king can move to for dx, dy in directions: nx, ny = king_x + dx, king_y + dy # Ensure position on board 1 to 8 (assuming 8x8 board) if 1 <= nx <= 8 and 1 <= ny <= 8: # If position not under attack, king can move there if not under_attack(nx, ny): return False # King cannot move anywhere safe, so is checkmate return True # Convert chess notation to numeric coordinates # a=1, b=2, ... h=8 and ranks 1-8 from bottom to top # Setup positions as described white_queens = ((1,4), (1,5), (2,6)) # a4, a5, b6 black_king = (1,3) # a3 if is_checkmate(white_queens, black_king): print("Checkmate:") else: print("Not checkmate") | [1] |
| Defines Function | Is Checkmate Function | [1] |
Timeline
Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.
References (1)
ctx:discord/blah/omega/215- full textomega-215text/plain2 KB
doc:agent/omega-215/3431313b-7012-460f-bc0b-866b4af66e31Show excerpt
[2025-11-20 14:39] omega [bot]: ✅ **Decision:** Respond | **Confidence:** 98% | **Reason:** AI: The user ajaxdavis explicitly requested that Omega share the code used in the previous Python simulation. This is a direct continuation of the t…
See also
Keep researching
Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.