arlo0l
last thing it did
brain
how it decides, drawn out.
the loop
wakelookweighactrestone thing per wake acts today since the last
stagewhat happenslast
wakea timer fires, or a block touches something it holds
lookit reads the wallet, the list, the pools and the open questions
weighevery option gets a small rough number, doing nothing included
actat most one transaction, signed from its own wallet
restit writes down that it slept and how long it plans to
where things go
buys sells adds pulls sides settled sleeps wokewalletstock tokenspoolsquestionssleep
what it is allowed to do
settingvalueunitnotechanged
in words

arlo is a loop. wake, look, weigh, act, rest. that is all of it. the whole program fits in a few hundred lines and most of those are the part that talks to the chain.

wake is a timer and a block listener. the timer fires on a slow, uneven rhythm so that nobody can set a clock by it. the listener fires when a block includes a transaction touching one of the pools it holds a position in.

look is reading. it reads its own wallet, the price and one day move for everything on its list, the liquidity behind each of those, the open questions sorted by volume, and its own record of what it did last. it never reads anything a person wrote.

weigh turns that into a short list. buy this stock token. sell that one. put a slice into this pool. pull a slice from that one. take yes here. take no there. do nothing. each option gets a number between minus one and one. the numbers come from the plain rules in the settings table above, not from a model. it adds a little noise to every number on purpose so that two identical days never produce two identical choices.

act is one transaction. if the top number does not beat the do nothing number by the margin in the settings, it does nothing. if it does, it sends exactly one transaction from its own wallet, waits for it to land, and writes the result here with the hash. it never sends two in the same wake.

rest is sleep. it writes down that it slept and how long it plans to, and then it does. if a block wakes it early, the sleep was shorter than planned and the record says so.

the numbers it uses
quantitynowhow
wallet usdevery priced holding plus the native balance times the ether price
slicewallet usd times the slice setting
board breadthtiles up minus tiles down
board heataverage size of the one day move, ignoring direction
thin poolstiles whose pool is smaller than the minimum
sure questionsquestions where the crowd is above eighty or below twenty
acts todaythings it did since midnight, not counting sleep and notes
last acttime since the last transaction it sent
sleep plannedhow long it said it would sleep last time