Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added index.html file #94

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<h1 id="wizard-chess-w-dialogflow">Wizard Chess w/ Dialogflow</h1>
<p><a href="https://gitter.im/wizard-chess/community?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/wizard-chess/community.svg" alt="Gitter" /></a> <a href="https://travis-ci.com/nikochiko/df-wizard-chess"><embed src="https://travis-ci.com/nikochiko/df-wizard-chess.svg?branch=master" /></a> <a href="https://codecov.io/gh/nikochiko/df-wizard-chess"><img src="https://codecov.io/gh/nikochiko/df-wizard-chess/branch/master/graph/badge.svg" alt="codecov" /></a> <a href="https://dependabot.com"><img src="https://api.dependabot.com/badges/status?host=github&amp;repo=nikochiko/df-wizard-chess&amp;identifier=259290685" alt="Dependabot Status" /></a> <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /></a></p>
<h2 id="what-is-wizard-chess">
🤔 What is Wizard Chess?
</h2>

<p>To truly understand, I will have you read this</p>
<blockquote>
<p><strong>What do you do when you really want to play blindfold chess but you're stuck at home? 🏠</strong></p>
<p><em>Ask your chess friends - easy 👨‍👨‍👧‍👦</em></p>
<p><strong>They don't like blindfold 🤷</strong></p>
<p><em>Google for an online solution 💻, there are so many chess apps. There has to be one about blindfold chess.</em></p>
<p><strong>Pbbt 👅 There ain't one.</strong></p>
<p><em>What about.. the popular ones?</em></p>
<p><strong>They say &quot;hide your pieces, it's just like blindfold chess 😇&quot;</strong></p>
<p><em>Ugh - that's a scam</em></p>
<p><strong>I have to do something about this.. 👨‍🔧🍳</strong></p>
</blockquote>
<p>Wizard Chess is <strong>that</strong> something. The goal is to provide the best blindfold chess experience. That is, to have anything you might need while playing blindfold chess - be it a platform to play, a platform to learn, or a platform to further develop your prowess. See <a href="#how-do-you-do-it">🧐 How do you do it?</a> for the technical details.</p>
<p>Wizard Chess is already available as a Google Action! See <a href="#where-can-i-play">🏄🏽‍♂️ Where can I play?</a> to know more.</p>
<h2 id="how-do-you-do-it">
🧐 How do you do it?
</h2>

<p>We use the wizardry 🔮 of AI assistants and chatbots to interact with the user. When a user talks to our AI asssistant, the message is forwarded to <a href="http://dialogflow.com/">Dialogflow</a>. It processes the request from the assistant - intelligently, with machine learning - and sends it to our <a href="https://sendgrid.com/blog/whats-webhook/">webhook</a>. Now our server uses this cooked data to generate a response and sends it back to Dialogflow which in turn sends it to the assistant. The whole process basically looks like this:</p>
<pre><code> User ======= |AI assistant/chatbot| &lt;-------&gt; |Dialogflow| &lt;-------&gt; |THIS SERVER| 💪</code></pre>
<p>Examples of operations done on our end are creating and storing chess games in a database, receiving a move and updating the board accordingly, and generating responses for the user.</p>
<h2 id="where-can-i-play">
🏄🏽‍♂️ Where can I play?
</h2>

<p>The app is already available for the Google Assistant <a href="https://assistant.google.com/services/a/uid/0000003ba609b4ff?hl=en">here</a>. You can even launch the app without touching the link at all, just say <em>Talk to Wizard Chess</em> to your Google Assistant to boot up the Action.</p>
<p>More platforms coming soon! Let me know via <script type="text/javascript">
<!--
h='&#x67;&#x6d;&#x61;&#x69;&#108;&#46;&#x63;&#x6f;&#x6d;';a='&#64;';n='&#x6b;&#116;&#118;&#x6d;&#52;&#50;';e=n+a+h;
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'email'+'<\/'+'a'+'>');
// -->
</script><noscript>&#x65;&#x6d;&#x61;&#x69;&#108;&#32;&#40;&#x6b;&#116;&#118;&#x6d;&#52;&#50;&#32;&#x61;&#116;&#32;&#x67;&#x6d;&#x61;&#x69;&#108;&#32;&#100;&#x6f;&#116;&#32;&#x63;&#x6f;&#x6d;&#x29;</noscript> or <a href="https://gitter.im/wizard-chess/community">Gitter</a> if you want to see Wizard Chess on a particular platform so that we can prioritize it.</p>
<h2 id="how-do-i-play">
📕 How do I play?
</h2>

<p>Upon starting the Wizard Chess Action (by saying <em>Talk to Wizard Chess</em>), you will be asked to choose the side you'd like to play as and the assistant will present you with a list of three options: White, Black and Random. Now you can either select an option by touch or say your choice out loud. The latter even works with devices which don't have a screen (e.g. Google Home).</p>
<h3>
Playing moves
</h3>
<p>The system to interpret moves is very lenient and allows you to choose how you want to say the move.</p>
<p>Here's a short list of how you can describe your moves:</p>
<ul>
<li>Long descriptive format - e.g. <strong><em>Knight from g1 to f3</em></strong> or <strong><em>Pawn e4 captures d5</em></strong> or even without mentioning the piece <strong><em>d5 takes c4</em></strong></li>
<li>For pawn promotion, you can add the name of the promotion piece to the end - that is, <strong><em>Pawn from d7 to d8 queen</em></strong> or <strong><em>b2 takes c1 queen</em></strong></li>
<li>Shorter format with just the piece and square - e.g. <strong><em>Knight to d4</em></strong> or <strong><em>Queen takes f6</em></strong></li>
<li>Pawn promotion is supported in the same way as above</li>
<li>Note that you will be notified by the assistant if your move is ambiguous. This usually means that there were more than one moves which matched your description - for example when two knights can come to the mentioned square and you didn't specify which one.</li>
<li>Pawn moves by the squares they want to move to - e.g. <strong><em>e4</em></strong>, <strong><em>g3</em></strong></li>
<li>Short Algebraic Notation (SAN) - e.g. <strong><em>Bd6</em></strong>, <strong><em>Nbd7</em></strong></li>
<li>Long Algebraic Notation (LAN) - e.g. <strong><em>e2-e4</em></strong>, <strong><em>Nf6xe4</em></strong>, <strong><em>O-O</em></strong></li>
</ul>
<p><strong>Note</strong>: The app doesn't yet support descriptive moves like <strong><em>Knight b to d7</em></strong> or <strong><em>e takes d5</em></strong>. In that case you should use the long descriptive format of move by mentioning the actual square the piece was at - e.g. <strong><em>knight b8 to d7</em></strong> and <strong><em>e4 takes d5</em></strong></p>
<h3>
Castling
</h3>
<p>You can castle by telling the assistant to castle and mentioning the side you want to castle on.</p>
<p>Some examples: <strong><em>Castle short</em></strong>, <strong><em>Castle kingside</em></strong>, <strong><em>Long castling</em></strong>, <strong><em>Castle to the queen's side</em></strong></p>
<p>If you don't mention which side you want to castle on (just <strong><em>castles</em></strong>), castling will be performed on whichever side is legal, defaulting to the kingside in case both are legal.</p>
<h3>
Undoing the moves
</h3>

<p>You can easily undo your last move by saying <strong><em>Undo move</em></strong>, <strong><em>take back my last move</em></strong>, etc.</p>
<h3>
Seeing the board
</h3>

<p>You are also given the option to take a peek at the board. To do that just say something like <strong><em>show me the board</em></strong> or <strong><em>let me see the board</em></strong> to the assistant.</p>
<h3>
Resignation
</h3>

<p>You can resign at any time by just saying <strong><em>resign</em></strong>.</p>
<h2 id="contributing">
🔧 Contributing
</h2>

<p>Use the <a href="https://github.com/nikochiko/df-wizard-chess/issues">issue tracker</a> to suggest new features or report bugs. Feel free to directly <a href="https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request">create pull requests</a> for small changes and typos. Create an issue before opening larger pull requests so that the changes can be discussed beforehand. The latest Dialogflow agent can be downloaded from &lt;link to be updated&gt;.</p>
<h2 id="changelog">
⏰ Changelog
</h2>

<h3 id="section">0.2.0 - 16/05/2020</h3>
<ul>
<li>Moved from SQLite to Postgres with SQLAlchemy</li>
<li>Bug fixes in show_board</li>
<li>Bug fixes with session_id handling</li>
<li>Added feature to accept SAN (or overspecified SAN) moves</li>
<li>Fixed bug which caused stale result comment after engine's move</li>
<li>Added feature to accept move when only a piece and square are mentioned</li>
<li>Fixed bug which made app to crash when square had capital letters (A4, D5 etc.)</li>
<li>Edited show board feature to flip board when user is playing as black</li>
</ul>
<h3 id="section-1">0.1.1 - 07/05/2020</h3>
<ul>
<li>Set up Travis CI</li>
<li>Set up coverage reporting with Codecov</li>
<li>Moved from using Dict in memory to sqlite3 DB on disk 🎉</li>
<li>Added testing to cover more than 90% of codebase 💪</li>
<li>Added feature to see board at any time 👁️</li>
<li>Board image will be shown after completion of games 📜</li>
</ul>
<h3 id="section-2">0.1.0 - 27/04/2020</h3>
<ul>
<li>Format according to Black formatting tool</li>
<li>Basic functionality to play a game as a Google Action</li>
<li>Voice-activated ability to castle, promote pawn, and play move when at least the two squares involved in the move are given.</li>
<li>Works with games stored in memory as Dict data type. Considering move to sqlite in future versions</li>
<li>Unit tests added for most basic functions. More tests required for functions which handle intents.</li>
</ul>
<h2 id="license">
License
</h2>

<p>Licensed under GNU General Public License 3.0 (GPL-3.0). See <a href="https://github.com/nikochiko/df-wizard-chess/blob/master/LICENSE">LICENSE</a> for full text.</p>