Coder Social home page Coder Social logo

uab-projects / crossword Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 5.0 1.4 MB

Project to learn and understand backtracking algorithms with the goal to solve a crossword puzzle

License: Apache License 2.0

Python 100.00%
artificial-intelligence backtracking-algorithm forward-checking heuristics heuristic-optimization crossword-solver crossword-puzzle crossword-board

crossword's Introduction

Crossword Solver

What is Crossword Solver?

The aim of the project is to implement an example of a backtracking algorithm (using improvements like Forward-Checking and some heuristics). To do this, we've dealt with the crossword problem. Given a crossword board and using a dictionary of valid words in a language, then we have to find a valid solution for that crossword applying the rules of the popular crossword game.

The algorithm

We'll use a backtracking algorithm variation: forward-checking, with some heuristics (LWF: Largest Word First, MCV: Most Constraining Values and MRV: Minimum Remaining Values) to improve the solving speed

What can the Crossword Solver do?

  1. Solve a crossword board (read from a file)
  2. Display the solving process the software applies while is solving the crossword. This helps us to check how the algorithm is working and introduce improvements based on its behaviour.
  3. Generate crossword puzzles given an empty crossword. We'll look for the solutions and afterwards look for the meanings of the words in an online dictionary (currently only in Wiktionary in Catalan language)

About the code

The code is written in Python 3, and requires some libraries (available in PyPi):

Libraries

Required

The following libraries are required for the software to run:

  • numpy

Optional

The following libraries must be present if you want to generate crossword puzzles based on an online dictionary

  • mwapi
  • beautifulsoup4

Running the application

The application is command-line based so, open a terminal and change into the repo's root. Then, you can run the application calling to Python interpreter into main script:

python src/main.py -h

The -h argument will help you to discover how the software works and what it can do for you

License

The code is licensed under Apache Software Foundation (ASF) License v2.0

Made with love in ETSE, UAB by @ccebrecos & @davidlj

UAB Logotype

crossword's People

Contributors

ccebrecos avatar davidlj95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

crossword's Issues

Problem of 'stty'

I met the problem of 'stty' is not recognized as an internal or external command,
operable program or batch file. How to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.