{"id":23897665,"url":"https://github.com/omerkel/alquerque","last_synced_at":"2025-08-22T12:35:04.147Z","repository":{"id":71262820,"uuid":"52561959","full_name":"OMerkel/Alquerque","owner":"OMerkel","description":"Alquerque - a 2 player abstract strategic perfect information traditional board game with computer AI option.","archived":false,"fork":false,"pushed_at":"2018-03-30T21:58:20.000Z","size":16166,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T17:18:43.069Z","etag":null,"topics":["2-player-strategy-game","ai","ai-players","artificial-intelligence","board-game","checkers","deterministic-game","draughts","entertainment","game","mcts","mobile","mobile-app","mobile-game","monte-carlo-tree-search","perfect-information","ucb","uct","upper-confidence-bounds"],"latest_commit_sha":null,"homepage":"http://omerkel.github.io/Alquerque/html5/src","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OMerkel.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-25T22:39:27.000Z","updated_at":"2024-08-18T10:57:30.000Z","dependencies_parsed_at":"2023-03-01T12:30:50.867Z","dependency_job_id":null,"html_url":"https://github.com/OMerkel/Alquerque","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/OMerkel/Alquerque","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OMerkel%2FAlquerque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OMerkel%2FAlquerque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OMerkel%2FAlquerque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OMerkel%2FAlquerque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OMerkel","download_url":"https://codeload.github.com/OMerkel/Alquerque/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OMerkel%2FAlquerque/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271638720,"owners_count":24794749,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["2-player-strategy-game","ai","ai-players","artificial-intelligence","board-game","checkers","deterministic-game","draughts","entertainment","game","mcts","mobile","mobile-app","mobile-game","monte-carlo-tree-search","perfect-information","ucb","uct","upper-confidence-bounds"],"created_at":"2025-01-04T17:17:08.168Z","updated_at":"2025-08-22T12:35:04.130Z","avatar_url":"https://github.com/OMerkel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"Alquerque icon\" width=\"64\" src=\"html5/src/img/icons/alquerque64.png\" /\u003e Alquerque\n====================\n\n* \u003cem\u003eStart an online\u003c/em\u003e \u003cb\u003eAlquerque\u003c/b\u003e \u003cem\u003esession on\u003c/em\u003e http://omerkel.github.io/Alquerque/html5/src\n* \u003cem\u003eAndroid APK available for install\u003c/em\u003e \u003cimg align=\"top\" width=\"32\" src=\"res/android.gif\" /\u003e https://github.com/OMerkel/Alquerque/releases/tag/release_0.1\n    * requires minimum Android 4.4.2 (API-19)\n* \u003cem\u003eRuns in various browsers on\u003c/em\u003e\n    * \u003cem\u003edesktop systems like BSDs, Linux, Win, MacOS and\u003c/em\u003e\n    * \u003cem\u003emobile platforms like Android, FirefoxOS, iOS.\u003c/em\u003e\n\n**Alquerque** - *2 player abstract strategic perfect information\ntraditional board game with computer AI option.*\n\n## Abstract\n\n_Alquerque is a board game demonstrator with computer AI using\nMonte-Carlo Tree Search (MCTS) with UCB (Upper Confidence Bounds)\napplied to trees (UCT in short). Alquerque is a medieval Spanish\nboard game closely influenced and originated from the Middle East\nalso known there as the game called Quirkat, Qirkat, or El-Quirkat.\nEtymological studies by Arie van der Stoep seem to strengthen the\nthesis for evidence of Roman influences. Assumption is that the\nArabic qirq or qirqa is borrowed from the Latin word calculus (meaning\na pebble or stone piece). If your sources distinguish among various\nAlquerque game variants then the most likely name for the implemented\ngame found here might be \"Alquerque de doze\". The oldest written\ndescription might be by Abu al-Faraj al-Isfahani in his works of\nBook of Songs (\"Kitab al-Aghani\"). Although the rules were not\ndescribed in there. An medieval source mentioning rules is the\nLibro de los juegos affiliated to (or at least commissioned by)\nAlfonso X el Sabio of León and Castile. Robert Charles Bell came up\nwith modern rule proposals and enhancements later on.\nThis Alquerque implementation has minor rule refinements neither\ncovered by Alfonso X nor Robert Charles Bell. Still the final\nrule set is close to the suggestions made by R.C. Bell._\n\n__Keywords, Categories__ _Monte-Carlo Tree Search (MCTS),\nUpper Confidence Bounds (UCB), UCB applied to trees (UCT), AI,\n2-player board game, deterministic game with perfect information,\nJavaScript, ECMAScript, W3C WebWorker_ \n\n# Description\n\nThis Alquerque is a board game using Monte-Carlo Tree Search (MCTS) with\nUCB (Upper Confidence Bounds) applied to trees (UCT in short) for the\ncomputer player AI. The board game is used for demonstration purposes of\nthe UCT algorithm.\n\n# Rules\n\nThere are different rules available for Alquerque de doze.\nThe default rules as implemented here are as follows.\nMind that some parts of the rules might be altered through\nselected options.\n\n## Game Material\n\n\u003cimg width='30%' ondragstart='return false;' alt='Game board with algebraic notation, Creative Commons License, This image is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.' src='html5/src/img/algebraic_notation.jpg' /\u003e\n\nAlquerque is a board game. The rectangular Alquerque board has\nfixed dimension of 5 times 5 positions horizontally and vertically.\nPositions on board are connected by a fixed line pattern showing\npotential paths of movement for players’ checkers. The checkers\nare placed on the positions (or _points_) of line intersections\nin the line pattern. There are two opposing players: one is\ncontrolling the light checkers and the other is controlling\nthe dark checkers.\n\n## Starting Position\n\n\u003cimg width='30%' ondragstart='return false;' alt='Initial board set up, Creative Commons License, This image is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.' src='html5/src/img/initial_board.jpg' /\u003e\n\nThe twelve light checkers are placed on all positions of rows 1 and 2,\nand positions d3 and e3 initially. Thus the row 1 is referred to as\nbeing the base row of the player controlling the light checkers.\nThe twelve dark checkers are placed on all positions of rows 4 and 5,\nand positions a3 and b3 initially. Thus the row 5 is referred to as\nbeing the base row of the player controlling the dark checkers.\n\n## Game Mechanics\n\nAlquerque is played alternating players’ turns. The player\ncontrolling light checkers moves first. A player either\n\n* must capture opponent’s pieces if possible or\n* must perform a normal non-capturing move otherwise.\n\nPassing a turn is not allowed.\n\n## Non-capturing Move\n \nMovement of checkers is performed strictly along the lines of\nthe board onto adjacent free positions.\n\nA light checker can not move from it's position to positions\non rows with lower numbers. A dark checker can not move from\nit's position to positions on rows with higher numbers.\nThus neither a light nor a dark checker can move backwards\nin direction of the player's own base row.\n\nA checker that reached the opponent's base row can not be\nmoved any longer but only capture opponent's checkers\nif possible. Anyway the checker is allowed to perform\nnon-capturing moves again, too, if after the capture it is\nnot positioned on the opponent's base row any longer.\n\n## Capturing Move\n\nCaptures are compulsory. If capturing is possible on a\nplayer’s turn then the player must perform a capturing move.\nA capture can be performed in any straight direction\nindicated by the line pattern of the board (even in\ndirection of own base row).\n\nAn opponent's checker on an adjacent position along a\nline of an own checker is captured by jumping over it\nin straight line onto an adjacent free position along\nthe line. Jumping to perform captures is done in straight\nline without any change of direction. Checkers captured\nleave the board and do not return. By each jump exactly\none single opponent's checker is jumped over and thus\ncaptured at a time. Checkers can not jump over or capture\ncheckers of own color. Captures can be done and are mandatory\nif available any time on own turn after the game has started.\n\nIn a player's turn multiple consecutive captures performed\nwith the same own checker are allowed and compulsory.\nThe player must continue to capture in the possible multiple\nconsecutive capture until no additional capture is possible.\nIt is not necessary to select the longest possible path\nto capture the maximum opponent’s pieces. On alternative paths\nthe player may decide freely on which one to continue capturing.\nAfter each single straight line jump if performing multiple\nconsecutive captures the direction of jumps may be changed\nalthough reverse direction change is not allowed.\nA captured checker is removed from game play instantly while\nbeing jumped. Thus it can not be reused to be jumped again\nin a multiple capture move.\n\nCheckers can not be stacked by moving or jumping\non top of the other.\n\n## Winning Conditions\n\nA player wins by either capturing all opponent's checkers or\nif the opponent can not perform any legal move.\nWith given rules a tie or draw game is only possible\nif the option _Inverting each pieces' own last move\nis... allowed_ is chosen. Per default inverting each pieces'\nown last move is strictly forbidden.\n\n# References\n\n* Guillaume Maurice Jean-Bernard Chaslot, \"[Monte-Carlo Tree Search](https://project.dke.maastrichtuniversity.nl/games/files/phd/Chaslot_thesis.pdf)\", PHD Proefschrift, Universiteit Maastricht, NL, 2010.\n* Guillaume Chaslot, Sander Bakkes, Istvan Szita and Pieter Spronck, \"[Monte-Carlo Tree Search: A New Framework for Game AI](http://sander.landofsand.com/publications/AIIDE08_Chaslot.pdf)\", in Proceedings of the Fourth Artificial Intelligence and Interactive Digital Entertainment Conference, Stanford, California, 2008. Published by The AAAI Press, Menlo Park, California.\n* Alfonso X el Sabio, \"Libro de los Juegos\" or \"Libros del Axedrez, Dados et Tablas\", 98 double-sided pages, available at the monastery library Real Sitio de San Lorenzo del Escorial, Madrid, Spain, written from 1251 to 1282.\n  * [Transcript/Translation into English](http://www.mediafire.com/?nenjj1dimtd) by Sonja Musser Golladay\n* Robert Charles Bell, \"Board and Table Games from Many Civilizations\", Volume 1, Dover Publications, US, 1979.\n* Sonja Musser Golladay, \"[Los libros de acedrex dados e tablas: Historical, Artistic and Metaphysical Dimensions of Alfonso X's Book of Games](http://arizona.openrepository.com/arizona/handle/10150/194159)\", PhD Dissertation, 591pp., The University of Arizona, US, 2007.\n  * http://hdl.handle.net/10150/194159\n  * http://jnsilva.ludicum.org/HJT2k9/AlfonsoX.pdf\n* Arie van der Stoep, \"[The origin of morris and draughts by etymology](http://bgsj.ludus-opuscula.org/PDF_Files/9_15_Stoep_print.pdf)\", in Board Game Studies Journal, Issue 9, 2015, ISSN 2183-3311, http://bgsj.ludus-opuscula.org, published by Associação Ludus, Lisboa, Portugal, 2015.\n\n# 3rd Party Libraries\n\n* jQuery: MIT licensed, https://github.com/jquery/jquery\n* jQuery Mobile: MIT licensed, https://github.com/jquery/jquery-mobile\n* Raphaël: MIT licensed, https://github.com/DmitryBaranovskiy/raphael\n\n# Links\n\n* Association for the Advancement of Artificial Intelligence, http://www.aaai.org\n* HTML Living Standard, Web Workers, https://html.spec.whatwg.org\n* Standard ECMA-262 ECMAScript Language Specification, http://www.ecma-international.org/publications/standards/Ecma-262.htm\n* Alphonso X - Book of Games - A Game Researcher's Resource, http://historicgames.com/alphonso\n* Board Game Studies Journal, http://bgsj.ludus-opuscula.org\n\n# Contributors / Authors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cp\u003eOliver Merkel,\u003cbr /\u003e\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis image is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-nd/4.0/\"\u003eCreative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License\u003c/a\u003e.\n    \u003c/p\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"30%\"\u003e\u003cimg width=\"100%\" ondragstart=\"return false;\" alt=\"Oliver Merkel, Creative Commons License, This image is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.\" src=\"html5/src/img/oliver_fanore-150809.jpg\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n_All logos, brands and trademarks mentioned belong to their respective owners._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomerkel%2Falquerque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomerkel%2Falquerque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomerkel%2Falquerque/lists"}