Projects
These are projects that I have created for fun, as personal challenges. Many times the goal has been to learn new techniques or technologies. Unless otherwise noted, each is designed to run in the (modern) web browser, desktop or mobile. They are all free to use - please enjoy!
Phlashy
Description
Phlashy is a single-page web app for creating, managing and studying virtual flash cards. An offline-first architecture allows you to continue using it while you lose internet connection. Phlashy is built using React, Redux, Express, Node, PostgreSQL, and quite a few smaller libraries.
How to use
- Create a free account
- Create a deck (to hold your flash cards)
- Add some cards
- Study them!
8-block Puzzle
https://turijs.github.io/8block/Description
This is my implementation of the classic 8-block puzzle. I included an auto-solve feature that makes use of a best-first search algorithm. It is also possible to solve puzzles manually.
How to play
The goal is to get all the blocks in order from left-to-right and top-to-bottom, starting with the "1" block in the top left corner and finishing with empty space in the bottom right corner (not pictured). You can move blocks by sliding them into the empty space; only blocks adjacent to the space may be moved. Move a block by clicking or tapping on it.
Tic-Tac-Toe
turiscilipoti.com/tic-tac-toe/Description
This was my first foray into writing game-playing AIs. tic-tac-toe was a good introduction, since it is such a simple game. This program uses the minimax algorithm to play a perfect game of tic-tac-toe. It is not possible to defeat it. Features include the ability to play as X, O, or both (solo play). It also has an "undo" move feature.
How to play
You know how to play tic-tac-toe, c'mon! Just click in the appropriate cell to make a move.
Tetris (Angular)
Description
My implementation of the classic game Tetris using the Angular.js framework. The basic rules of play are true to the original, but certain aspects of the game can be modified. I included a piece editor and options for changing the size of the board. This allows for many entertaining variations! This project is desktop-only for now.
How to play
You probably know the basics of tetris. Controls:
- Arrow keys:
- ← left; ↑ rotate; → right; ↓ soft drop
- Space:
- soft drop
- H:
- "hold" piece for later use/switch to previously held piece
- Escape:
- pause
All customization options are available from the pause menu
Calibron12 Puzzle
turiscilipoti.com/calibron12/Description
I was inspired to create a virtual version of this puzzle—including a solution algorithm—after I received a physical copy as a gift. I used a recursive backtracking search for the auto-solving feature. This puzzle is quite difficult to solve by hand - please have a go if you would like! Unfortunately this creation is not mobile friendly.
How to play
The goal is simple - fit all of the smaller pieces into the larger square, without any of them overlapping. Pieces can be moved by clicking and dragging them. Press R while dragging to rotate.
Connect 4
turiscilipoti.com/connect4/Description
My second—and substantially more complicated—attempt at a game-playing AI, this time for connect 4 (also known as four-in-a-row). It is also based on the minimax algorithm. I experimented with lots of optimizations, including alpha-beta pruning, iterative deepeneing, and transposition tables. Javascript is of course not the best language for writing a program this complicated and performance-critical, however it was an interesting challenge. Note that my program does not play perfectly, though it is worth noting that the game of connect 4 has been solved by others.
How to play
The players take turns placing pieces; the first to connect four pieces in a row (either horizontally, vertically, or diagonally) wins. Each turn a player must place a piece in one of the seven columns that is not yet filled up. Pieces drop to the lowest empty space within a column (in other words, they stack). A draw occurs if the board fills up before either player acheives four-in-a-row.
Make your move by simply clicking on the column where you wish to add your piece.