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
TextBoxes++: A Single-Shot Oriented Scene Text Detector

TextBoxes++: A Single-Shot Oriented Scene Text Detector Introduction This is an application for scene text detection (TextBoxes++) and recognition (CR

Minghui Liao 930 Jan 04, 2023
Automatically fishes for you while you are afk :)

Dank-memer-afk-script A simple and quick way to make easy money in Dank Memer! How to use Open a discord channel which has the Dank Memer bot enabled.

Pranav Doshi 9 Nov 11, 2022
EQFace: An implementation of EQFace: A Simple Explicit Quality Network for Face Recognition

EQFace: A Simple Explicit Quality Network for Face Recognition The first face recognition network that generates explicit face quality online.

DeepCam Shenzhen 141 Dec 31, 2022
Slice a single image into multiple pieces and create a dataset from them

OpenCV Image to Dataset Converter Slice a single image of Persian digits into mu

Meysam Parvizi 14 Dec 29, 2022
OCR of Chicago 1909 Renumbering Plan

Requirements: Python 3 (probably at least 3.4) pipenv (pip3 install pipenv) tesseract (brew install tesseract, at least if you have a mac and homebrew

ted whalen 2 Nov 21, 2021
Deskewing images with slanted content

skew_correction De-skewing images with slanted content by finding the deviation using Canny Edge Detection. To Run: In python 3.6, from deskew import

13 Aug 27, 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
MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition

MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition Python 2.7 Python 3.6 MORAN is a network with rectification mechanism for

Canjie Luo 595 Dec 27, 2022
A small C++ implementation of LSTM networks, focused on OCR.

clstm CLSTM is an implementation of the LSTM recurrent neural network model in C++, using the Eigen library for numerical computations. Status and sco

Tom 794 Dec 30, 2022
Document blur detection based on Laplacian operator and text detection.

Document Blur Detection For general blurred image, using the variance of Laplacian operator is a good solution. But as for the blur detection of docum

JoeyLr 5 Oct 20, 2022
A curated list of promising OCR resources

Call for contributor(paper summary,dataset generation,algorithm implementation and any other useful resources) awesome-ocr A curated list of promising

wanghaisheng 1.6k Jan 04, 2023
POT : Python Optimal Transport

This open source Python library provide several solvers for optimization problems related to Optimal Transport for signal, image processing and machine learning.

Python Optimal Transport 1.7k Jan 04, 2023
A curated list of resources for text detection/recognition (optical character recognition ) with deep learning methods.

awesome-deep-text-detection-recognition A curated list of awesome deep learning based papers on text detection and recognition. Text Detection Papers

2.4k Jan 08, 2023
Convolutional Recurrent Neural Networks(CRNN) for Scene Text Recognition

CRNN_Tensorflow This is a TensorFlow implementation of a Deep Neural Network for scene text recognition. It is mainly based on the paper "An End-to-En

MaybeShewill-CV 1000 Dec 27, 2022
Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Microsoft 235 Dec 22, 2022
Distilling Knowledge via Knowledge Review, CVPR 2021

ReviewKD Distilling Knowledge via Knowledge Review Pengguang Chen, Shu Liu, Hengshuang Zhao, Jiaya Jia This project provides an implementation for the

DV Lab 194 Dec 28, 2022
a micro OCR network with 0.07mb params.

MicroOCR a micro OCR network with 0.07mb params. Layer (type) Output Shape Param # Conv2d-1 [-1, 64, 8,

william 29 Aug 06, 2022
Smart computer vision application

Smart-computer-vision-application Backend : opencv and python Library required:

2 Jan 31, 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
A curated list of resources dedicated to scene text localization and recognition

Scene Text Localization & Recognition Resources A curated list of resources dedicated to scene text localization and recognition. Any suggestions and

CarlosTao 1.6k Dec 22, 2022