{"id":28000620,"url":"https://github.com/sysprog21/kxo","last_synced_at":"2025-05-08T23:53:53.311Z","repository":{"id":284381321,"uuid":"945372382","full_name":"sysprog21/kxo","owner":"sysprog21","description":"A Tic-Tac-Toe Game Engine implemented as Linux kernel module","archived":false,"fork":false,"pushed_at":"2025-04-30T07:39:54.000Z","size":59,"stargazers_count":7,"open_issues_count":0,"forks_count":74,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T23:53:48.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysprog21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-09T09:04:20.000Z","updated_at":"2025-05-07T06:48:50.000Z","dependencies_parsed_at":"2025-04-21T05:36:19.000Z","dependency_job_id":null,"html_url":"https://github.com/sysprog21/kxo","commit_stats":null,"previous_names":["sysprog21/kxo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fkxo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fkxo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fkxo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fkxo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysprog21","download_url":"https://codeload.github.com/sysprog21/kxo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166486,"owners_count":21864471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-08T23:53:52.854Z","updated_at":"2025-05-08T23:53:53.305Z","avatar_url":"https://github.com/sysprog21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kxo: A Tic-Tac-Toe Game Engine implemented as Linux kernel module\n\n## Introduction\n`kxo` is a Linux kernel module that implements the [tic-tac-toe game](https://en.wikipedia.org/wiki/Tic-tac-toe)\n(aka XO Game) as kernel threads.\nThis educational module demonstrates several essential Linux kernel programming concepts:\n  - Circular buffer implementation\n  - Mutex lock synchronization\n  - IRQ handling\n  - SoftIRQ processing\n  - Tasklet scheduling\n  - Workqueue management\n  - Kernel thread creation and execution\n\nThe module supports multiple AI algorithms for game strategy, allowing kernel threads to compete against each other in tic-tac-toe matches.\n`kxo` implements two advanced algorithms for tic-tac-toe gameplay:\n- Monte Carlo Tree Search (MCTS): A probabilistic algorithm that uses random sampling to evaluate moves and determine optimal game strategies\n- Negamax Algorithm: A depth-first minimax variant that efficiently evaluates game positions by alternating between maximizing and minimizing players\n\n## Build and Run\nAfter the source code is downloaded, go into the directory and do as the following\n```\n$ make\n```\n\nMake sure the kernel object file (`kxo.ko`) is built correctly, then you can insert the kernel module\n```\n$ sudo insmod kxo.ko\n```\n\n`kxo` provides an interface for userspace interaction through the companion tool `xo-user`.\nThis utility offers the following functionality:\n- Display the current status of the `kxo` module (loaded/unloaded)\n- Real-time visualization of the tic-tac-toe game board\n- Control commands:\n  - `Ctrl + P`: Toggle pause/resume of the game board display\n  - `Ctrl + Q`: Terminate all tic-tac-toe games running in kernel space\n\nSimply run the command below after the kernel module is loaded:\n```\n$ sudo ./xo-user\n```\n\nTo unload the kernel module, use the command:\n```\n$ sudo rmmod kxo\n```\n\n## License\n\n`kxo` is released under the MIT license. Use of this source code is governed\nby a MIT-style license that can be found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fkxo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysprog21%2Fkxo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fkxo/lists"}