Algorand is the world’s first decentralized blockchain open-source built on a pure proof-of-stake consensus protocol that allows billions of scalability and transaction certainty. It is the first blockchain protocol to have the instant finality for transactions, no forking nor vulnerability. More and more Decentralized Financial companies, governments, and businesses increasingly turning to Algorand technological innovations for next-generation applications, it was then announced around April (2020) that there is a new Algorand Developer Portal. It is a place where designers and programmers can find all the tools they need to turn their innovative thoughts into applications on a large scale.
The Algorand development portal is an advance and educative avenue for developers to carry on with the implementation of their visions. The portal provides a new, improved interface and three different types of content designed for developers such as Tutorials in form of Step-by-step guides for common code patterns on Algorand, such as account formation or asset transfer. Another type of content designed is the Solutions channel which showcases the real use of Algorand cases with examples of code and explications. Lastly, the Articles sections in a Blog-like form detailing new product updates, insightful op-eds, and other news and events related to developers.
Well, one of the most recent works of developers on the development portal is the AlgoNim, the first game to be launched on Algorand. It is a game based entirely on Algorand (ALGO), which runs on the blockchain’s layer 1. AlgoNim got its name from the traditional version of the NIM game, a mathematical strategy game in which two players take turns to pick (or “nim”) items from different heaps or piles. A player must withdraw at least one object on each turn and can remove any number of objects provided they all come from the same heap or stack. The goal of the game is either to avoid taking the last object or to take the last object, depending on the version being played.
On AlgoNim, game rules are enforced via Algorand Smart Contracts; the pawns are represented by Algorand Standard Assets, and players perform the game actions in turn directly on the blockchain through Atomic Transfers, easy right? Algorand technology, if properly channeled can be used to do amazing ways such as the AlgoNim. Nim is a mathematically solvable game; moves can be predicted and calculated so it is usually more interesting to play against fellow humans such as friends and families than playing against a bot. Since AlgoNim is based on pure proof of stake, it is safe to say no one can cheat or rig the game, every move to winning will have to be convincing to one’s opponent.
The rules involved in AlgoNim are based on the variant of Nim’s Normal Single Heap. The person who creates the match is the dealer while the person he is to play against is the opponent.
Rules of the Game are:
1. The Dealer chooses a heap of N pieces to be placed on the game table for the match.
2. The Dealer chooses the number M of pieces that can be removed, at most, from the game table on each turn.
3. Players agree on who moves first.
4. On each turn each player removes at least 1 and at most M pieces from the game table;
Whoever removes the last piece of the heap from the table wins the match!
How it works
AlgoNim automatically writes and initializes a designated collection of stateless TEAL ASC1s and ASAs for each match via seamless connectivity with the Algorand Python SDK & PyTeal. It takes a few seconds to set up the whole match and costs about 0.008 ALGOS in processing fees. AlgoNim accounts require a minimum initialization and opt-in balance, so the Dealer needs 0.8 ALGO which can be reimbursed by slightly improving the TEAL ASC1s making them more cost-effective. This time/cost efficiency is very remarkable compared to other Blockchains, given that a new ASA + ASC1 architecture is created for each match.
How to install AlgoNim
To install AlgoNim, you’ll need to have some programming knowledge as it runs on msgpack, docopt, algosdk, and pyteal PYTHON 3 MODULES. Also, some specific environmental variables and files are needed; the settings and files can be found here.
This is the first version of the ‘crypto’ game; it is safe to say that there will be improvements, in the long run, to further enhance users’ experience and overall performance. Some of these future improvements stated by AlgoNim include;
- Improving Bet Escrows effectiveness
- Freezing ASAs for anyone other than the players in the match
- Automatically delete the ASAs of the match at game end
- Adding ASA AlgoNim Score to the Sink of the Scores Pool as a winner’s reward
- Implementing a version of “Multi-heaps”
- Implement a “Championship” feature (2 matches out of 3).
‘AlgoNim is played entirely from the interface on the command-line. To find other players on AlgoNim here’
There are so many interesting projects on the Algorand development portal; this is just one of the few exciting projects. The portal is built to equip developers with adequate knowledge to make groundbreaking discoveries and innovations. The general perception of blockchain and its usefulness is further enlightened by Algorand blockchain protocol by setting the avenue for a fully transparent, decentralized, and borderless system.