Play the Namibian game of Owela against a terrible AI. Built using Django and htmx.

Overview

Owela Club

A Django project for playing the Namibian game of Owela against a dumb AI. Built following the rules described on the Mancala World wiki page for Owela.

Running

  1. Make a Python 3.9 virtual environment with dependencies:

    python3.9 -m venv venv
    source venv/bin/activate
    python -m pip install -U pip wheel
    python -m pip install -r requirements.txt

    The code was developed on Python 3.9 but may run on older versions.

  2. Run the tests:

    pytest

    This should show output starting with:

    === test session starts ===
    

    …and finishing with output like:

    === 28 passed in 0.74s ===
    
  3. Create the development database:

    python manage.py migrate
  4. Start the development server.

    On Linux and macOS:

    DEBUG=1 python manage.py runserver

    On Windows:

    set DEBUG=1
    python manage.py runserver

Developing

You’re free to edit the code already, but for the smoothest experience there are some extra tools you can set up.

First, there’s Editorconfig, which ensures your text editor is well configured for editing. Install the appropriate editorconfig plugin for your text editor and the plugin will automatically confgiure your text editor based on the .editorconfig file.

Second, there’s pre-commit, which runs several code quality tools whenever you run git commit. These tools are configured in the .pre-commit-config.yaml file. To set up pre-commit:

  1. Install pre-commit by following its instructions. You can use your virtual environment’s pip for the simplest setup.

  2. Install the pre-commit hooks into your local repository:

    pre-commit install

    This will configure Git to run pre-commit before each commit.

  3. Check all files in the repository pass your pre-commit setup:

    pre-commit run --all-files

    You should see many Passed messages, such as:

    isort....................................................................Passed
    flake8...................................................................Passed
    

Extra tasks

This site has only been built as a demo of using htmx with Django. It’s therefore missing some useful features for playing the game. Here are some ideas of how to extend it...

  • Deploy the game online by using hosting such as Heroku and following the Django deployment checklist.
  • Make the board look good, maybe using a stony texture or showing the actual seeds.
  • Display more information about the last two moves, such as highlighting selected squares and affected squares.
  • Make the AI smarter - perhaps based on some heuristics such as “move from the biggest square” or “prefer moves on the inner row”.
  • Have multiple AI functiosn and allow new games to pick which one to play against.
  • Allow selecting different board widths.
  • Allow rule variations such as Hus or regional/house rules.
  • Allow player-versus-player games. htmx’s hx-trigger polling can be used for simple updating of the board state.
  • Add a login function so players can track their games.
Owner
Adam Johnson
🦄 @django technical board member 🇬🇧 @djangolondon co-organizer ✍ AWS/Django/Python Author and Consultant
Adam Johnson
Repository for Scene Text Detection with Supervised Pyramid Context Network with tensorflow.

Scene-Text-Detection-with-SPCNET Unofficial repository for [Scene Text Detection with Supervised Pyramid Context Network][https://arxiv.org/abs/1811.0

121 Oct 15, 2021
Maze generator and solver with python

Procedural-Maze-Generator-Algorithms Check out my youtube channel : Auctux Ressources Thanks to Jamis Buck Book : Mazes for programmers Requirements P

Joseph 19 Dec 07, 2022
An application of high resolution GANs to dewarp images of perturbed documents

Docuwarp This project is focused on dewarping document images through the usage of pix2pixHD, a GAN that is useful for general image to image translat

Thomas Huang 97 Dec 25, 2022
A pkg stiching around view images(4-6cameras) to generate bird's eye view.

AVP-BEV-OPEN Please check our new work AVP_SLAM_SIM A pkg stiching around view images(4-6cameras) to generate bird's eye view! View Demo · Report Bug

Xinliang Zhong 37 Dec 01, 2022
A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database.

A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database. The structure, shape and proportions of the faces are comp

Pavankumar Khot 4 Mar 19, 2022
Repository collecting all the submodules for the new PyTorch-based OCR System.

OCRopus3 is being replaced by OCRopus4, which is a rewrite using PyTorch 1.7; release should be soonish. Please check github.com/tmbdev/ocropus for up

NVIDIA Research Projects 138 Dec 09, 2022
Document Image Dewarping

Document image dewarping using text-lines and line Segments Abstract Conventional text-line based document dewarping methods have problems when handli

Taeho Kil 268 Dec 23, 2022
Pixie - A full-featured 2D graphics library for Python

Pixie - A full-featured 2D graphics library for Python Pixie is a 2D graphics library similar to Cairo and Skia. pip install pixie-python Features: Ty

treeform 65 Dec 30, 2022
This repository summarized computer vision theories.

This repository summarized computer vision theories.

3 Feb 04, 2022
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

48.4k Jan 09, 2023
Text Detection from images using OpenCV

EAST Detector for Text Detection OpenCV’s EAST(Efficient and Accurate Scene Text Detection ) text detector is a deep learning model, based on a novel

Abhishek Singh 88 Oct 20, 2022
Histogram specification using openCV in python .

histogram specification using openCV in python . Have to input miu and sigma to draw gausssian distribution which will be used to map the input image . Example input can be miu = 128 sigma = 30

Tamzid hasan 6 Nov 17, 2021
Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016.

SynthText Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Ved

Ankush Gupta 1.8k Dec 28, 2022
M-LSDを用いて四角形を検出し、射影変換を行うサンプルプログラム

M-LSD-warpPerspective-Example M-LSDを用いて四角形を検出し、射影変換を行うサンプルプログラムです。 Requirements OpenCV 3.4.2 or Later tensorflow 2.4.1 or Later Usage 実行方法は以下です。 pytho

KazuhitoTakahashi 9 Oct 14, 2022
Learning Camera Localization via Dense Scene Matching, CVPR2021

This repository contains code of our CVPR 2021 paper - "Learning Camera Localization via Dense Scene Matching" by Shitao Tang, Chengzhou Tang, Rui Hua

tangshitao 65 Dec 01, 2022
A simple Digits Recogniser made in Python

⭐ Python Digit Recogniser A simple digit Recogniser made in Python Demo Run Locally Clone the project git clone https://github.com/yashraj-n/python-

Yashraj narke 4 Nov 29, 2021
list all open dataset about ocr.

ocr-open-dataset list all open dataset about ocr. printed dataset year Born-Digital Images (Web and Email) 2011-2015 COCO-Text 2017 Text Extraction fr

hongbomin 95 Nov 24, 2022
Simple app for visual editing of Page XML files

Name nw-page-editor - Simple app for visual editing of Page XML files. Version: 2021.02.22 Description nw-page-editor is an application for viewing/ed

Mauricio Villegas 27 Jun 20, 2022
SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

NVIDIA Research Projects 31 Nov 22, 2022
Introduction to image processing, most used and popular functions of OpenCV

👀 OpenCV 101 Introduction to image processing, most used and popular functions of OpenCV go here.

Vusal Ismayilov 3 Jul 02, 2022