REPOSITORY OVERVIEWLive repository statistics
★ 5Stars
⑂ 2Forks
◯ 0Open issues
◉ 5Watchers
59/100
OPENREPOHUB HEALTH SIGNALMixed signals
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
52 Community adoption25% weight
12 Maintenance state20% weight
100 License clarity10% weight
100 Project information10% weight
75 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
Hnefatafl
Hnefatafl originated in Scandinavia many centuries ago. It was developed from a Roman game called Ludus Latrunculorum. This game flourished until the arrival of chess. It was revived back in nineteenth century.
Algorithm and approach
This project used minmax algorithm with alpha-beta pruning. The heuristic evaluation function considers king position, number of attackers and defenders remaining, how close it is to capture king etc. Based on the values provided by this function for all possible valid moves at a state, ai decides which move to commit.
How to run
- Install uv using the following command (or, you can follow the instructions here - https://docs.astral.sh/uv/getting-started/installation/)
pip install uv
- Clone this repository
git clone https://github.com/Bokhtiar-Adil/Vikings-chess-Hnefatafl.git
- Go to the cloned repository and run the game
cd Vikings-chess-Hnefatafl
uv run game_arena.py
Rules
- Turn based board game.
- Two board sizes: 'large' - 11x11 and 'small' - 9x9.
- Center cell and four corner cells are called restricted cells.
- Excluding king, a-d count is 24-12 on large board and 16-8 on small board.
- All pieces except king can move any number of cells horizontally or vertically.
- King can move only one cell at a time.
- Only king can move to any of the restricted cells.
- Pieces, except king, can be captured by sandwitching them from both sides.
- Restricted cells can be used to sandwitch opponent.
- Only one opponent piece can be captured in single line with single move.
- Multiple pieces can be captured with a single move on cardinal points.
- To capture king, attackers need to sorround him on all four cardinal points.
- If king is captured, attackers win.
- If king escapes to any of the four corner cells, defenders win.
- If all attackers are captured, defenders win.
Screenshots



ALGORITHMICALLY RELATEDSimilar Open-Source Projects
Selected from shared topics, language and repository description—not editorial ratings.
a Python and Jupyter Notebook implementation of permutation-based jigsaw puzzle reconstruction with a genetic algorithm and Dots and Boxes game search with Minimax and alpha-beta pruning. This project was developed as the Second Computer Assignment for the Artificial Intelligence course at the University of Tehran.
59/100 healthRecently updatedActive repository
HTMLNo license#artificial-intelligence#genetic-algorithm#jupyter-notebook#minimax-algorithm
⑂ 0 forks◯ 0 issuesUpdated 26 days ago
This Python-based Tic Tac Toe game features an AI opponent that uses adversarial search with the minimax algorithm and alpha-beta pruning. Experience strategic gameplay as the AI makes optimal moves to challenge players, ensuring a competitive and engaging experience.
31/100 healthActive repository
PythonNo license#adversarial-search#ai#alpha-beta-pruning#artificial-intelligence