Skip to content
View Bakar404's full-sized avatar
🤿
🤿

Highlights

  • Pro

Block or report Bakar404

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Bakar404/README.md

Ahmed Abdelsalam, drawn in pixels, waving: "Hi, I'm Ahmed. I like to learn & build!"
Interests: being creative, building with AI, building cool products and game theory. Tools. AI + agents: MCP, Multi-agent orchestration, Agent evals, Microsoft Agent Framework, Azure AI. Languages: Python, TypeScript, JavaScript, Swift, SQL, C++, R, DAX, HTML/CSS. Build: React, Next.js, Vite, Tailwind, Node.js, FastAPI, SwiftUI, CoreAudio. Data + cloud: Azure, Microsoft Fabric, Power BI, Power Platform, Data Factory, Synapse, Databricks, pandas, NumPy, SciPy. Ship: Supabase, Firebase, Cloudflare Workers, GitHub Actions, Playwright, Git, Azure DevOps, Jira. + Anything that gets the job done.
Nim against a perfect bot, game 2, move 1. Heaps: A has 1, B has 3, C has 5; nim-sum 7. Games won: humans 0, bot 1. Game 1: @Bakar404 took 1 from B, then the bot took the last match and won. Pick a heap and how many matches to take with the keys below.
Heap A:Take 1 from heap A
Heap B:Take 1 from heap BTake 2 from heap BTake 3 from heap B
Heap C:Take 1 from heap CTake 2 from heap CTake 3 from heap CTake 4 from heap CTake 5 from heap C

How does the bot decide?

The bot never guesses. It writes each heap in binary and XORs them together, column by column with no carrying. That's the nim-sum.

  • Facing a nim-sum of 0? Any move you make breaks the zero, and the bot can always restore it. It keeps handing you zeros until it takes the last match.
  • Facing anything else? Some move turns it into 0. Make that move every turn and you take the last match. Charles L. Bouton proved this in 1901, one of the first results in combinatorial game theory.

Every game starts with a nonzero nim-sum and you move first, so a perfect bot can still be beaten.

A key opens an issue titled like nim: take 2 from A (game 1, move 1). A GitHub Action plays your move and the bot's with src/nim.py, redraws the board and replies to you. Every pixel here is drawn by src/scenes.py.

Popular repositories Loading

  1. VolC VolC Public

    Native macOS menu bar app for lightweight per-app volume control using SwiftUI, CoreAudio process discovery, and safe AppleScript fallbacks for supported apps

    Swift 1

  2. Bakar404 Bakar404 Public

    Interactive pixel-art profile: play Nim against a perfect bot by opening an issue.

    Python

  3. first-contributions first-contributions Public

    Forked from firstcontributions/first-contributions

    🚀✨ Help beginners to contribute to open source projects

  4. A-Comparative-Analysis-of-K-means-Using-Pythagorean-Means A-Comparative-Analysis-of-K-means-Using-Pythagorean-Means Public

    NSF-supported undergraduate research: K-means clustering with arithmetic, geometric and harmonic centroid updates. 1st place poster; presented at JMM 2024.

  5. StudyMax StudyMax Public

    Student planner: weekly class timetable, deadlines ranked by priority, and study files in one place. Runs in the browser with no account; Supabase optional.

    JavaScript

  6. claude-code claude-code Public

    Forked from RishabhK103/claude-code

    Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflo…

    TypeScript