Skip to content
Jordan Miller edited this page Jan 25, 2019 · 3 revisions

Welcome to the maestro wiki!

Automatic Actors needed for each number of input datapoints:

>>> def combinatorial(n, k):
...     import math
...     return math.factorial(n) / (math.factorial(k) * math.factorial(n-k))
...
>>> def how_many(n):
...     added = 0
...     for i in range(1, n):
...         added += combinatorial(n, i)
...     return added
...
>>> how_many(2)
2.0
>>> how_many(3)
6.0
>>> how_many(4)
14.0
>>> how_many(5)
30.0
>>> how_many(6)
62.0
>>> how_many(7)
126.0
>>> how_many(8)
254.0
>>> how_many(9)
510.0
>>> how_many(10)
1022.0
>>> how_many(11)
2046.0
>>> how_many(12)
4094.0
>>> how_many(13)
8190.0
>>> how_many(14)
16382.0
>>> how_many(15)
32766.0
>>> how_many(16)
65534.0
>>> how_many(17)
131070.0
>>> how_many(18)
262142.0
>>> how_many(19)
524286.0
>>> how_many(20)
1048574.0
>>> how_many(21)
2097150.0
>>> how_many(22)
4194302.0
>>> how_many(23)
8388606.0
>>> how_many(24)
16777214.0
>>> how_many(25)
33554430.0
>>> how_many(26)
67108862.0
>>> how_many(27)
134217726.0
>>> how_many(28)
268435454.0
>>> how_many(29)
536870910.0
>>> how_many(30)
1073741822.0
>>> how_many(31)
2147483646.0
>>> how_many(32)
4294967294.0

as an example consider the Rubik's cube - 54 sides, 6 colors, 8 corners, 12 edges, 6 behaviors. if we modeled each cube (corner or edge) as one data point that would amount to 20 data points requiring 1048574 actors. Not 1048574 concurrent actors as the actors will be trimmed down to the prime ones immediately, but 1048574 actors none the less. The prime actors are further subdivided into classes - those that see few input data points, and those that see many. If it is known ahead of time all the input indexes that the actions upon the system will effect then there is no need to build actors merely the trim them. One can simply specify the number of actors and their corresponding input indexes.

By modeling each cube the base required for each data point would either be 15 or 20, 15 for the edge cases, 20 for the corners: combinatorial(6 colors, 2 sides) and combinatorial(6 colors, 3 sides). Alternatively, if each cube was uniquely named, each data point would simply be a number between 1 and 48 inclusive (centers are not cubes). However its probably best to model the more complicated colors of the sides since it would be a more accurate depiction of its ability to naturally ignore extraneous data and learn the environment as it is.

Of those 1048574 actors, a minority would be prime actors. a minority still would be primary actors. One action effects one side of the cube, always including 4 corners and 4 edges. thus the largest prime actors would be 8-digit actors. so over time, the actors will be trimmed to only those actors of the 8 combinatorial level (125970 actors) that model entire sides of the system. 6 sides mean 6 primary actors. these six actors are the only ones needed to control the environment.

when given a starting location and a goal, each refers to their memory of "input + action = result" key-value pairs in order to path find simultaneously from the current state to the goal state and backward from the goal state to the initial state. They of course only know about their side of things. It is, therefore, a distributed, bi-polar, breadth-first search.

they all must know the data point indexes they see in the overall scheme of the input because during the broadcast they need to be able to coordinate on that information (they see overlapping input indexes). Those actors with common indexes broadcast to only each other.

The protocol that they broadcast is quite simple only a few things need to be sent. First of all the message hash. Each message has a unique hash and contains a hash of a message that it is in response to. Each message also contains a boolean value indicating if this thread is seeking the goal or the initial state. Each message contains the action, and the resulting state of the environment (the next input). A chain of messages, therefore, becomes a list of states and their results, bound together by actions, which is the truly valuable part of the chain. the broadcasts that look most like the solution are responded to first since as a heuristic rule across all environments change is incremental in nature.

Lastly, a naive generalization algorithm is implemented to provide the system guidance as it searches for solutions to problems it has never seen before. The generalization is nothing more than reasoning by analogy. In other words, if an actor has seen AAB turn into BBA with a given action, and is asked how to get from CCD to DDC that actor may suggest that action as a possibility, citing the analog pattern it knows, especially if the same indexes are involved.

With these tools of naive generalization, simple lookup procedures and an elementary protocol we can create an intelligent network of agents that can evaluate and manage any environment that is sufficiently constrained (where it's state space is static).

Clone this wiki locally