How to come up with Autonomous Agents Ideas

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@whoisterencelee·
0.000 HBD
How to come up with Autonomous Agents Ideas
<html>
<p><img src="https://lh6.googleusercontent.com/qbw6ELmGasH6fnlWnU0JQLzfPXWWjjDMoHkHPxnFFXVWs54F5uvyoBkwH2SsYkuL0mhqCksYnuT1hPW8m0of=w1280-h950" width="1024" height="768"/></p>
<p>Since I've been seeing a few registry related Obyte Autonomous Agents (AA) turning up recently again. &nbsp;Thought it would be a good idea to go over the thinking process I have used when I first submitted the OAAAAA concept during <a href="https://steemit.com/obyte/@whoisterencelee/oaaaaa-obyte-autonomous-autonomous-agent-address-agent">the contest's first round</a> back in early Aug and <a href="https://steemit.com/obyte/@whoisterencelee/oaaaaa-obyte-autonomous-autonomous-agent-address-agent-is-working">revised version </a>in mid Aug. &nbsp;The latest full version is at the bottom.</p>
<h3>Let start with an AA idea</h3>
<p>In order to come up with an AA, some starts off thinking about a vending machine; but I tend to think first in terms of what people would likely need or want to use and whether the functionalities required to make the idea work can be decentralized. &nbsp;I think this way it's easier to come up with practical ideas and allows me to defer the difficulties of the implementation, then for each piece I can think about how to implement these functionalities in Oscript, and then finally how to connect these to make the whole thing work.</p>
<h3>The Basic Structure of an AA</h3>
<p>To me, Oscript is a JSON based declarative structure, so it is helpful to me to develop and test each functionality individually, and then fit each part into the final structure. &nbsp;I think that's one of the reason why I have been using flow charts more than start to write code immediately to develop AA. &nbsp;Also, it helps to visualize how the whole thing will work in the end, even if I have lots of complicated moving parts like the REDvsBLUE AA which passes messages between multiple AAs.</p>
<h3>In Conclusion</h3>
<p>It's quite easy to come up with ideas for AA if I think in terms of functionalities, and if we use the divide and conquer method, we can surely make these ideas a reality.</p>
<pre><code>{ messages:<br>
 // OAAAAA Obyte Autonomous Autonomous Agent Address Agent by whoisterencelee@hotmail.com<br>
 // an address registry and router that allows updates &amp; transfer of address/properties, see below USAGE<br>
 // please note : before registering an new AA or transfer ownership of an existing AA <br>
 // ***MAKE SURE*** to add ```var[ 'authors' ] = &lt;author submission address&gt;;``` to the new AA app : `state`<br>
 // as it will be the only address allowed to make future transfer<br>
{ cases: [<br>
{<br>
 if: "{ <br>
 $checkaddress = trigger.data.address;<br>
 if ( !$checkaddress ) bounce( 'input: { address : address , [ data : passthur_data ] , [ newaddress : newaddress ] , [ checkonly : false ] }' ); // USAGE<br>
 // doesn't matter if checkaddress is valid or not because it will bounce when routing to the invalid address<br>
<br>
 $logicaladdress = var[ $checkaddress ];<br>
 if ( $logicaladdress ){ // FOUND LOGICAL ADDRESS<br>
<br>
 $currentaddress = var[ $logicaladdress ]; // GET LATEST ADDRESS<br>
<br>
 $newaddress = trigger.data.newaddress;<br>
 if( $newaddress ){ // again doesn't matter if newaddress is valid or not , RECEIVED NEW ADDRESS<br>
<br>
 if( var[ $currentaddress ][ 'authors' ] == trigger.address ){ // CHECK OWNERSHIP<br>
 // transfer of arbitrary address types will be possible in the future when AA can explore DAG<br>
<br>
 $route = $newaddress; // ROUTE TO NEW ADDRESS<br>
 // actual ownership transfer done in app state<br>
<br>
 } else {<br>
 bounce( 'Trigger address does not match with var[ authors ] in ' || $currentaddress || ' which is require to make newaddress transfer' );<br>
 }<br>
 } else {<br>
 $route = $currentaddress; // ROUTE TO LATEST ADDRESS<br>
 }<br>
<br>
 }else{<br>
 $route = $checkaddress; // registration will be done at app state , ROUTE TO CHECK ADRESS FIRST TIME<br>
 }<br>
<br>
 if( trigger.data.checkonly ){ // CHECKONLY<br>
 if( $checkaddress != $route ) bounce( 'Please use latest address at ' || $route );<br>
 else bounce( 'This address ' || $checkaddress || ' is the latest');<br>
 }<br>
<br>
 // ROUTE with pass thur data<br>
 $route<br>
<br>
 }",<br>
 messages: [<br>
 {<br>
 app: 'payment',<br>
 payload: {<br>
 asset: 'base',<br>
 outputs: [<br>
 { address: '{$route}' }<br>
 ]<br>
 }<br>
 },<br>
 {<br>
 app: 'data',<br>
 payload: '{trigger.data}'<br>
 },<br>
 {<br>
 app: 'state',<br>
 state: `{<br>
<br>
 if( !$logicaladdress ){<br>
 var[ 'L' || $checkaddress ] = $checkaddress; // create logical address<br>
 var[ $checkaddress ] = 'L' || $checkaddress; // set checkaddress to logical address<br>
 $msg = ' a new address registration';<br>
 } <br>
 if( $newaddress AND $logicaladdress AND $currentaddress AND var[ $currentaddress ][ 'authors' ] == trigger.address ){<br>
 var[ $logicaladdress ] = $newaddress;<br>
 var[ $newaddress ] = $logicaladdress;<br>
 $msg &nbsp;= ' address has been transferred from ' || $currentaddress;<br>
 }<br>
<br>
 response[ 'message' ] = 'Routing to ' || $route || $msg;<br>
<br>
 var[ 'authors' ] = '7MDNSRYFRLJ4PQMPD5TZPIO5JHCTYNQI';<br>
<br>
 }`<br>
 } <br>
 ]<br>
}<br>
] } }</code></pre>
</html>
👍 , , ,