Make yourself a coffee and prepare for some seriously bad-ass Autonomous Agents!

The sixth and initially thought to be the last round of the Autonomous Agents Developer Contest has now concluded, and the bar has been significantly raised. Had it not been for the cancellation of round 3 this would have been the last round. It was decided, however, that instead of plain and simple cancellation, the third round would be moved so we could introduce a 7th round in the contest.

I am more than happy about this decision. Week after week we have seen increasingly advanced entries. We have watched the Autonomous Agents framework grow, the Oscript editor improve, and the GUI wallets offer new and tailor made features to support these extensive new possibilities. No one in their right mind would question the additional round 7!

Entries for the final 7th round must be submitted before the deadline Thursday October 24th 12am UTC

Once again, this round has seen some impressive entries, and some surprising ones too. For the second consecutive round, nobody managed to crash the testnet or find any exploitable bugs. While this is clearly refreshing, I would also have loved to celebrate another round of contestants in the Crash and Burn category. But a natural development — and one of the most important purposes of having this contest in the first place, has been to discover problems and fix them. With roughly 2 months of improvements and stabilization behind us, it is only natural to see the platform become increasingly stable and robust.

Autonomous Agents Entries For Round 6

Like round 5, this one saw 7 entries. If you haven’t yet tried them, here’s a brief summary of each.

Entry 1 — “Obot” by whoisterencelee

This entry has super interesting potential. The general description of its function is that it allows users to rent out their computer’s (or their brain’s) processing power. First, a user creates a new job with the Autonomous Agent. The job is what others can help provide the solution to.

The example implementation is an array sorting mechanism. For other and more complex computations, a new Autonomous Agent would need to be created that implements the specific algorithm or mechanism that the jobs will apply to.

Since all transactions to and from the Autonomous Agent are publicly visible, it is possible to create a headless wallet that listens for new transactions to and from the Agent. This would make it possible to run an AA that solves new jobs that get created in order to cash in the reward for solving the job.

The entry demonstrates a new and interesting use case for Autonomous Agents, but would still need some improvements to be perfect. Specifically in terms of validating the results posted to the AA it is likely going to be a hard problem to solve. But as the author also states, it could be implemented in a similar way as the World Community Grid does it — by sending the same task to several solvers and comparing the results.

The entry is followed up by an example of a headless wallet listening for the Autonomous Agent, and triggering it with the correct result once a new job is being created. So it is one of the first combined Autonomous Agent and Headless Wallet entries we’ve seen in the contest. Further it is definitely smooth — as soon as the job request became stable, the corresponding Headless Wallet triggered and returned the correct result.

Autonomous Agent Definition

Autonomous Agent Address: BXAODQ4VCZ3I4CHQHHLZFE72TXK5MU7C

Documentation provided in #aa-contest-entries channel on Obyte Discord

Entry 2 — “Simple Public Asset Storage” by sharjar

“Now where did I hear this title before”, you might think. And you would be absolutely right. The contest has so far seen several entries trying to solve a quite difficult problem. The problem of being able to use a secret password to withdraw funds from an Autonomous Agent.

To fully understand the problem, you should note that all transactions to and from Autonomous Agents are publicly visible, and also takes a while for a transaction to become stable. These two facts can potentially cause problems since a malicious user will see the actual owner’s attempt to withdraw funds and could then craft a copy of the transaction, but withdrawing to his own wallet instead of the actual owner’s. While it might not be easy, there could be ways that a full node could analyse the DAG and the position of the owner’s transaction and see if it was possible to select a parent for his malicious attempt to race the owner’s transaction and have his own transaction end up getting sorted before the owner’s.

Past entries have used different approaches on how to solve these problems. But it appears the first to truly solve it might be sharjar. Better still, in a world of cryptography, algorithms and complex mathematics, the solution provided in this entry is remarkably simple: the owner must tell the Autonomous Agent that he wants to withdraw before actually doing it.

You could say that by exploiting the very cause of the problem — the time from when a transaction is made until it becomes stable — the owner will be able to see if others are basically trying to race him. When his transaction telling the Autonomous Agent has become stable, it will then allow the same wallet address to provide the correct secret password within an hour to make the actual withdrawal. With confirmation times usually around 10–15 minutes, the rightful owner now has at least 45 minutes to check if others have sent the initial request to withdraw and if so, simply not send a second transaction with the secret password.

The flow in summary:

The owner lets the Autonomous Agent know that they want to make a withdrawal.

-Wait until the transaction becomes stable.

-Once stable, the owner checks if others have sent a similar request to the Autonomous Agent.

- If nobody has sent a similar message to the Autonomous Agent, the owner can now create the actual withdrawal request providing the secret password.

- If another similar request is seen, the owner must wait one hour. The malicious user doesn’t know the password and therefore cannot construct the second transaction that triggers the actual withdrawal.

The solution is both clever and wonderfully simple.

Autonomous Agent Definition

Autonomous Agent Address: 2W6XFKSHXI5OJRZR7T4LQBFZ2GZ3BZBN

Documentation provided in #aa-contest-entries channel on Obyte Discord

Entry 3 — “ObyStack Game” by Crypto Girl

In one of the most thorough and complete entries in the entire span of the contest, this entry introduces a fun and fast paced game — as fast as the confirmation time allows. In a game of skill, strategy and a tiny bit of luck, players compete to become the last to make a deposit to the Autonomous Agent wallet address. The last player to have made a transaction when the game ends wins half the pool, and the player who started the round wins the other half.

Each game lasts exactly 1 hour from the time the first player starts a new round. You may be thinking: “But Autonomous Agents cannot act without a triggering transaction sent to it, so how does it know when the game ends and who the winners are?”. A very good question indeed — and a question that would have no answer had it not been for the seamless integration between a headless wallet monitoring the Autonomous Agent and the transactions sent to/from it.

Players may play the game both by interacting directly with the Autonomous Agent or by using the purpose built chatbot. This makes the game experience significantly smoother, since the chatbot is able to create pre-filled transactions that the user simply accepts and pushes the “Send”-button in the wallet to play

Better still, there is comprehensive documentation accompanying the entry. The documentation makes it a breeze to connect with the chatbot and learn how to start playing the game. The only little thing that could possibly be improved is to have the chatbot greet the user and suggest the users first action (which would be to insert the wallet address that will be used in the game).

Autonomous Agent Definition

Autonomous Agent Address: RQI2WE6EVSK6CY3NRNLHGQXUNJGZGU35

Documentation and instructions for the game

Tutorial on creation of the Autonomous Agent

Tutorial on creation of the Chat Bot

Entry 4 — “Last Or Popular AA Version Available (LOPAAVA)” by hey_monkey

We previously saw an entry that makes a registry kind of solution which would allow developers of Autonomous Agents to control different versions of the same Autonomous Agent. This entry has a somewhat similar goal. Instead of letting the developer of the Autonomous Agent have control, it uses a crowd sourcing approach to determine two different potential parameters of any Autonomous Agent; 1. which is the most popular and 2. which is the most recent.

The most popular version is determined by examining previous votes cast in favor of or against a given version. The primary users of this Autonomous Agent would be other Autonomous Agents, since they can reference a given uniquely registered name of an Autonomous Agent. Future use will automatically revert to the most popular or the most recent version depending on the implementation in the primary Autonomous Agent.

A drawback could be that when a new version of an Autonomous Agent is introduced, it would automatically rank lower than the currently most popular, simply because fewer votes have been cast in favor of the new version. Potentially malicious users are prevented from voting more than once from different addresses, as casting a vote requires the voter to have completed Real Name Attestation. This is a rather clever use of attestations previously created for the triggering wallet address.

An excellent feature of this entry is that bounce messages provide information about which data fields to add or change in order to create a valid transaction with data to be sent to the Autonomous Agent. This is something that should be mandatory in all future Autonomous Agents to go live on Mainnet and is an example to follow by others.

Autonomous Agent Definition

Autonomous Agent Address: XC4CZPEWWPQMYSIQH33I7FSRGC6YYGIN

GitHub Repository

Documentation

Entry 5 — “Kind Of DAG Snapshot Simulator” by lion’s heart

The primary target users for this Autonomous Agent are most likely other Autonomous Agents. By examining previous units sent to/from the triggering address, the Autonomous Agent is able to provide a balance of a given asset at any point in time for that particular address.

It would be interesting to see plausible applications or examples where it would make sense, as well as a bit of documentation on which parameters the Autonomous Agent requires. Elaboration about the bounce messages returned to users that try to figure out which parameters to send would also be good to see.

A few examples provided by the developer on Discord could be an airdrop conducted by an ICO in pretty much the same way as Obyte (then Byteball) once distributed Bytes to holders that proved ownership of Bitcoin.

The lack of documentation apart from the in-line code comments, made this entry rather difficult to properly assess, but this can of course easily be written when introduced on Mainnet.

Autonomous Agent Definition

Autonomous Agent Address: MXPDTONZLVKEFFRWVWYQ4YTASHLOUPZ6

Entry 6 — “AA Asset — Asset Exchange” by Barborico

The possibility to make smooth exchanges between different assets is super useful and it might prove a valuable or even profitable use case when introduced on Mainnet.

The Autonomous Agent allows for creating or filling orders of any arbitrary exchange between assets. Both to/from Bytes and to any given asset as well as between any assets directly.

It currently implements another previous entry created by hey_monkey (DANAA) an asset registry that allows issuers of tokens to register metadata about their asset, including its name. By using this other Agent, the asset-to-asset exchange is able to determine which issuing unit to look at when determining which asset an order concerns.

The complexity of this entry is extremely high and it would likely make it rather difficult for a user to interact with directly. This is also obvious in the comments made on the GitHub repository of this entry where the author suggests implementing a decentralized exchange with a more user friendly web frontend. Another and slightly less user friendly option would be a chatbot much similar to the existing Exchange Bot found in the Bot Store.

Just like the Exchange Bot, the orders registered with this Autonomous Agent need to be either completely filled or the bid will be cancelled and bounced. This is a common problem with decentralized exchanges where there are no intermediaries to act as escrow during the time it takes to fill an order completely.

A potential improvement would therefore be to implement a way to allow for partially filled orders. By having an Autonomous Agent provide fully transparent handling of orders, it would be the perfect agent to carry out partially filled orders between users as no third party would be able to access any of the assets on the Autonomous Agent.

Autonomous Agent Definition

Autonomous Agent Address: YVTTJBYCQJUILLIHR6XUEQQVJG3EEQLG

GitHub Repository With Documentation

Entry 7 — “WEAALTH Use An AA To Establish Your GBytes Testament” by hey_monkey

In his second entry for this round, hey_monkey introduces a highly relevant use case. An Autonomous Agent that allows users to create a testament or will to be executed on. This would mean for example that if you died your cryptocurrency assets could be passed on to your next of kin In quite an intricate setup, the Autonomous Agent actually makes use of another entry from this very round — the entry by sharjar that allows a safe mechanism to withdraw funds by providing a secret passphrase.

This entry has pretty much everything you would want from a will. The ability to add any number of beneficiaries that will receive a specified percentage of the heritage should the creator pass away and no longer be able to withdraw funds himself. It of course requires funds to be stored on the Autonomous Agent since the heritage shared between the beneficiaries needs to be present at the time each beneficiary wants to claim their defined share.

Each beneficiary will be provided a passphrase by the creator of the testament, and they will need this to be able to withdraw funds. Should a beneficiary make a claim before the passing of the creator, the only thing the creator has to do to prevent the withdrawal, is provide a counter-order, telling the Autonomous Agent not to release any funds. This is probably also a good time to create a new will with new beneficiaries to avoid that greedy chancer from getting any of the heritage when the time comes.

In terms of providing guidance and documentation, this entry is equally as excellent as hey_monkey’s other entry, and all bounce messages are easily understood which helps the user interact more smoothly. The intricate process for setting up and claiming the heritage might favor a web frontend to be created to assist the users, or hide away some of the variable names under a nice and tidy web-interface. But that should be fairly easy to add at a later stage.

There has been a long-standing challenge for someone to create a dead-man’s switch by Obyte veteran Slackjore, and I couldn’t help but recall the challenge as I studied this entry to see if there were any obvious flaws or unhandled exceptions. Slackjore still pops up on Discord from time to time (and religiously edits the Obyte email newsletter) and I am sure it would be possible to figure out a way to further improve on this use case to make it even simpler, easier to use and more gentle on the eye than an in-wallet interaction with an Autonomous Agent.

Autonomous Agent Definition

Autonomous Agent Address: 4NB2NCNCD74UF3KELXCZFHX6OKEVNROV

GitHub Repositories (likely to be updated with this entry)

Full Documentation

Guide And Tutorial Entries For Round 6

This round saw an interesting mix of entries. The past rounds only had a 1–2 entries, but this one has 4. While previous rounds’ entries were all very different, there seemed to be a similar approach to this one as they all focused on the implementation of one (or more) of the entries in this or previous rounds.

Entry 1 — “htAAStackGame” by Crypto Girl

The entry takes the reader through the entire implementation of the ObyStack game that Crypto Girl entered in the Autonomous Agent contest. It is a very good step-by-step approach where the focus is on gradually building the entire Autonomous Agent more or less from scratch.

An interesting aspect is it starts out using only a few lines of pseudo code in comments, explaining exactly what is going to happen in that exact part of the Autonomous Agent. This makes it super easy to follow, even for non-developers, and provides an excellent introduction to developers wanting to further understand how the logic of an Autonomous Agent can be constructed.

Link to tutorial

Entry 2 — “htBotStackGame” by Crypto Girl

In a very similar way as the first entry by Crypto Girl, this one shows a step-by-step approach on how a headless wallet can be created to interact with an Autonomous Agent, and help users interact with the Autonomous Agent by generating pre-filled payment request-fields with data needed by the Autonomous Agent.

While entries in the Autonomous Agent Developer Contest’s Guide/Tutorial category commonly describe aspects of Oscript, it is refreshing to also see an entry that shows how the Oscript language’s shortcomings can be circumvented by the use of a headless wallet.

Both entries from Crypto Girl take the reader through any prerequisites, and ensure that if someone tries to build the exact same version it would work pretty much out of the box. But by only giving away things bit by bit, it makes sure the reader enters a journey of learning and retaining new knowledge.

Link to tutorial

Entry 3 — “Reviews Of Autonomous Agent Techniques” by whoisterencelee

In yet another extremely elaborate post, whoisterencelee provides an updated version of his previous guide/tutorial with a take on how to approach the creative process. It includes a literal firework of ideas and suggestions, dos and don’ts, as well as some really creative approaches on how to use flow charts to better grasp the full scope of the Autonomous Agent before starting to write any code.

The reason this topic is so important is that it provides some important insights into when it makes sense to use an Autonomous Agent. But more importantly; when it doesn’t. Autonomous Agents are good at many things, but there are some things that will either be extremely difficult to achieve if not downright impossible.

Link to tutorial

Entry 4 — “Last Or Popular Autonomous Agent Version Available” by hey_monkey

The implementation of the crowd sourcing mechanism used in the Last Or Popular entry, is one of the most useful mechanisms implemented in Autonomous Agents so far. In a previous round, hey_monkey provided a user reputation scoring system that also profits from the crowd sourcing principles.

There is no doubt in my mind that crowd sourcing will be an absolutely paramount feature in any autonomous system that must introduce a way to adapt to the world around it. Only by creating this functionality from the very beginning will it be possible to have an Autonomous Agent (or any autonomous system for that matter) adapt and adjust to the environment it exists in. We have only begun to see where IoT could potentially bring us, and time and time again we will witness the recurring problem of how to allow systems to adapt and do so in a fairly controllable and predictable way.

Link to tutorial

The Winners

In a round that far exceeds any of the previous in terms of interesting and highly useful entries, the jury once again found it extremely difficult to have to decide on which three entries to award prizes to. It is crystal clear that while the first rounds focused on exploring possibilities, this one saw some seriously useful, thoroughly implemented entries that all have merit, and it would make total sense to keep an eye on all of them when Autonomous Agents and Oscript support goes live on Mainnet.

Another great contribution is the careful consideration of users by the entrants, and the focus in providing such smooth and easy to follow documentation on how to use the Autonomous Agents. A particularly useful addition was the use of bounce-messages to help guide users lean how to create valid transactions that will trigger the Autonomous Agent with all required parameters.

Since the very first round the quality and feasibility of entries has skyrocketed and while it is hard to see how this could become any better, who knows what we have in line for the 7th and final round (deadline for entries October 24) of this Autonomous Agents Developer Contest? Only time will tell! But what we can tell you now, are the three entries the jury has decided to award this round’s prizes.

Third Place

Third place and a prize of 35 GB and 73.85 GBB goes to:

“Simple Public Asset Storage” by Sharjar

This entry manages to solve a problem that no one had been able to come up with a plausible (or safe) solution to before. The fact that it turned out to be a fairly simple solution just adds to the sheer beauty of it. One of the tag-lines of Obyte is: “Simplicity is beauty”, and the entry by Sharjar proves this point…beautifully.

An elegant nod to the solution also comes from a somewhat unexpected source. In this very same round of the contest, another contestant (Entry 7 — WEAALTH) saw this entry and picked up on it and implemented it as part of their entry. This definitely shows that not only is this entry a safe and simple way to handle the withdraw with passphrase problem, it is also easy for others to implement in other Autonomous Agents.

Second Place

Second place and a prize of 70 GB and 147.7 GBB goes to:

“WEAALTH Use An AA To Establish Your GBytes Testament” by hey_monkey

The entry solves a problem that is highly relevant to many in the crypto space, and could potentially become a major problem to any such project if not solved. Few solutions exist where a crypto enthusiast can safely store funds out of reach of third parties, but still in a way that allows funds to be accessible by relatives in case of the owner’s death. There probably aren’t many people that have so far made sure access to their crypto holdings is passed on to their families and relatives. Maybe Satoshi has died and unfortunately didn’t have WEAALTH available to him prior to his death..

Since this particular use case is so relevant to many millions of people, it would be highly encouraged to stick to this idea and further develop it to as an actual real world application used by many when Autonomous Agents become available on Mainnet. Developing a neat web-frontend for this use case would add even more possibilities and provide even easier management of users’ digital wills.

The Winner

For round six of the Autonomous Agents Developer Contest, the winner of 140 GB and 422 GBB is:

“ObyStack” by Crypto Girl

The entry by Crypto Girl showed excellence on so many different levels that the jury were pretty much blown away! While the game itself might come across as relatively simple, it still does a fantastic job of engaging users to return and play again. It showcases how an Autonomous Agent can become so much more potent when accompanied by a headless wallet, enabling lots of features that the Autonomous Agent could not single handedly carry out. It of course introduces a slight reliance on the availability of the chatbot, but as long as the chatbot acts as a helper that makes interacting easier for users, this doesn’t matter at all.

Another highlight of this entry is the careful attention in providing as smooth and easy a user experience as possible. The documentation for the entry is super easy for normal users to follow and by allowing users to play the game using the chatbot to create the transactions, it makes the experience so much better than having to figure out how to hand craft the data fields to send to the Autonomous Agent.

Best Guide/Tutorial

Three of the four entries in this round shared pretty much the same characteristics. They all describe how one of the entries (or more of the previous entries) were created. It has therefore been difficult for the jury to evaluate the entries against each other. Because they each do a great job at explaining the particular entry.

The entrants took the opportunity to dive into specific areas of the Oscript language based on a step-by-step approach following the implementation of the actual Autonomous Agent developed for this round.

But just as with the Autonomous Agents, a winner must be selected, and for this round the jury found that the entry providing the best and most useful description for the reader and the winner of the 55 GB and 116.05 GBB is:

“ObyStack AA Stack Game” by Crypto Girl

The meticulous structure and step-by-step walkthrough of the entire script for the Autonomous Agent makes this entry particularly good. The quality of the example code as well as the screenshots showing the gradual progress of the construction makes it an interesting read even to non-developers. And there will most definitely be several useful things to learn for developers wanting to get started writing Autonomous Agents.

On behalf of the entire jury, a very big thank you to all the contestants and BOY did you guys make this round tough! There were several entries neck and neck, and the entries that ended up just short of the top-3 all have a quality that would likely have resulted in a solid top-3 position in the previous rounds. So even though the entries awarded prizes in this round were absolutely excellent, there is much reason to also applaud the developers of the other entries. May I remind everyone that while right now this is a contest with monetary prizes, it is also a breeding bed for potential profitable real world applications of Autonomous Agents when it goes live on Mainnet. There will come a time when developers able to implement Autonomous Agents will be in high demand.

For the 7th and last round of the Autonomous Agents Developer Contest, the deadline for entries in both Autonomous Agents and Guide/Tutorial categories is Thursday October 24th at midnight UTC.

Happy Oscripting, everyone!