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
Deep LearningImage Captcha 2

滑动验证码深度学习识别 本项目使用深度学习 YOLOV3 模型来识别滑动验证码缺口,基于 https://github.com/eriklindernoren/PyTorch-YOLOv3 修改。 只需要几百张缺口标注图片即可训练出精度高的识别模型,识别效果样例: 克隆项目 运行命令: git cl

Python3WebSpider 117 Dec 28, 2022
Repository of conference publications and source code for first-/ second-authored papers published at NeurIPS, ICML, and ICLR.

Repository of conference publications and source code for first-/ second-authored papers published at NeurIPS, ICML, and ICLR.

Daniel Jarrett 26 Jun 17, 2021
Random maze generator and solver

Maze Generator and Solver I wrote a maze generator that works with two commonly known algorithms: Depth First Search and Randomized Prims. Both of the

Daniel Pérez 10 Sep 23, 2022
Connect Aseprite to Blender for painting pixelart textures in real time

Pribambase Pribambase is a small tool that connects Aseprite and Blender, to allow painting with instant viewport feedback and all functionality of ex

117 Jan 03, 2023
Camelot: PDF Table Extraction for Humans

Camelot: PDF Table Extraction for Humans Camelot is a Python library that makes it easy for anyone to extract tables from PDF files! Note: You can als

Atlan Technologies Pvt Ltd 3.3k Dec 31, 2022
learn how to use Gesture Control to change the volume of a computer

Volume-Control-using-gesture In this project we are going to learn how to use Gesture Control to change the volume of a computer. We first look into h

Diwas Pandey 49 Sep 22, 2022
Handwritten Text Recognition (HTR) using TensorFlow 2.x

Handwritten Text Recognition (HTR) system implemented using TensorFlow 2.x and trained on the Bentham/IAM/Rimes/Saint Gall/Washington offline HTR data

Arthur Flôr 160 Dec 21, 2022
This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vectors.

Vectorizing color range This repo contains a script that allows us to find range of colors in images using openCV, and then convert them into geo vect

Development Seed 9 Jul 27, 2022
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network

text-detection-ctpn Scene text detection based on ctpn (connectionist text proposal network). It is implemented in tensorflow. The origin paper can be

Shaohui Ruan 3.3k Dec 30, 2022
Table recognition inside douments using neural networks

TableTrainNet A simple project for training and testing table recognition in documents. This project was developed to make a neural network which reco

Giovanni Cavallin 93 Jul 24, 2022
MeshToGeotiff - A fast Python algorithm to convert a 3D mesh into a GeoTIFF

MeshToGeotiff - A fast Python algorithm to convert a 3D mesh into a GeoTIFF Python class for converting (very fast) 3D Meshes/Surfaces to Raster DEMs

8 Sep 10, 2022
This repo contains several opencv projects done while learning opencv in python.

opencv-projects-python This repo contains both several opencv projects done while learning opencv by python and opencv learning resources [Basic conce

Fatin Shadab 2 Nov 03, 2022
第一届西安交通大学人工智能实践大赛(2018AI实践大赛--图片文字识别)第一名;仅采用densenet识别图中文字

OCR 第一届西安交通大学人工智能实践大赛(2018AI实践大赛--图片文字识别)冠军 模型结果 该比赛计算每一个条目的f1score,取所有条目的平均,具体计算方式在这里。这里的计算方式不对一句话里的相同文字重复计算,故f1score比提交的最终结果低: - train val f1score 0

尹畅 441 Dec 22, 2022
Scene text detection and recognition based on Extremal Region(ER)

Scene text recognition A real-time scene text recognition algorithm. Our system is able to recognize text in unconstrain background. This algorithm is

HSIEH, YI CHIA 155 Dec 06, 2022
This Repository contain Opencv Projects in python

Python-Opencv OpenCV OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library. OpenCV was

Yash Sakre 2 Nov 06, 2021
STEFANN: Scene Text Editor using Font Adaptive Neural Network

STEFANN: Scene Text Editor using Font Adaptive Neural Network @ The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 2020.

Prasun Roy 208 Dec 11, 2022
Layout Analysis Evaluator for the ICDAR 2017 competition on Layout Analysis for Challenging Medieval Manuscripts

LayoutAnalysisEvaluator Layout Analysis Evaluator for: ICDAR 2019 Historical Document Reading Challenge on Large Structured Chinese Family Records ICD

17 Dec 08, 2022
Go package for OCR (Optical Character Recognition), by using Tesseract C++ library

gosseract OCR Golang OCR package, by using Tesseract C++ library. OCR Server Do you just want OCR server, or see the working example of this package?

Hiromu OCHIAI 1.9k Dec 28, 2022
Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. This Neural Network (NN) model recognizes the text contained in the images of segmented words.

Handwritten-Text-Recognition Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. T

27 Jan 08, 2023