Code Monkey home page Code Monkey logo

wikipediagame's Introduction

WikipediaGame

You can play with an updated and live version of this at my blog at https://singlethreaded.me/wikipedia-game. It'll run your query on a server, so you don't need to download this repo at all.

This will try and find the shortest path between two wikipedia articles. The program can be run with:

python parse.py

The program will then do this: Beginning Program....

Enter start point: Enter end point:

For these two, enter the start and end articles you would like to find a path between. In the wikipedia link for the article will be formatted something like this: www.en.wikipedia.org/wiki/name_of_article (e.g www.en.wikipedia.org/wiki/North_Dakota). When entering the name of the article, you can use capitals or non-capital letters, use spaces instead of underscores (though underscores will still work).

The program will run a heuristic-helped BFS starting from the start point. It will print out all the articles it is currently exploring. Then at the end, it will print a path from the start to the end.

For example: Start Article: Palantir End Article: Africa

Path: Palantir -> Magic (Middle-earth) -> J.R.R Tolkien -> Commander of the Order of the British Empire -> Orders, decorations, and medals of the United Kingdom -> United Kingdom -> Europe -> Africa

Enjoy!

wikipediagame's People

Contributors

eswardhinak avatar

Stargazers

Lewin Cary avatar

Watchers

 avatar

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.