Are there other Ruby folks using "distributable dynamic agents" forproject work?

S

SwarmShepherd

Good Day,

My purpose to write this is to possibly discuss with people if
somebody thinks they understand the nature my project. I am
independent of any businesses or institutions. All the work is 100%
in 1.9.1 Ruby now and not so big or overwhelming on the
Serverside. Just teaching myself anything on the clientside and get
giant headaches and frustration at all things JS.

Here is a basic project descriptions:

Project is ongoing and was started with a Berlin Internet company
about 5 years ago. He was to do the clientside. Then he move to
Prague.
This project uses extensive "Helper Library" system (maybe like
Ruleby).
HelperLibrary allows the 'agents" to be simple.
There are two types of "Agents": 1. Data 2. Rule (data simple,
rules make assertions, some overlogic but all like natural language
sentences)
The agents are multi-sections. Each "section" is actually a DSL.
data have 2-3 sections rule agents have 6-7 sections
The "Engine" can "fire" over 2,500 "agents" per second on my less than
1/2 state-of-the-art machine. (Execution of one DSL / but they can
"early out")
Agents leave "casings" (dont ask) - but this is a record of all
interface actions with the HelperLibrary.
My background is much manufacturing/process contrl / statistical so
maybe you can guess how "casings" will contain useful back-chaining(?)
type information.
Agents are text files, maybe to think of as a EMail? But from
computer to computer so no chit chat, but reads much like a natural
language.
Data is stored in what I call a "Object Server" like a "automatic
database" but a "Object" IS the record. This way a method becomes a
"Topic". Maybe think of a a 3d database, not sure but very flexible
for my own work, performance, and run-time dynamic 'vocabulary'
building is all now is full automatic.
After Object servers established in a Domain (1st domain have 5
servers) then work project work seems mostly to be done in the
HelperLibrary - nothing else to
do.

What maybe interesting if you follow above some - is that the Agents
created in a "Expert Session" which is like filling in a form to
create sentences.
This means that the "agents" can be created by anybody, anytime per
the web to build knowledge in the ObjectServers.

This project has been on and on going, progress is slow now because I
am working alone on much of it and know very little, and have no real
patience
for to build internet interface, although some critical screens have
been modeled in Tk on Ruby - great frustration at first - but now done
clean.

Please understand that I am an applications programmer some of old-
school but some of new and I do have a 'git' account but find it
awkward and can't
believe all the fuss and invented language to do somethings simple. I
also have no time for "is it bigger than a bread-box?" dialogs. If
somebody knows of
anything like this then please let me know, but so far searches have
not found anything.

Finally, I will be interested to contribute the code to some entity
that know / and have a record of doing this right, but until I finish
the project, so far, I cannot
see anything but grief come from sharing without documentation and
proper support.

Thankyou!
 
R

Ryan Davis

If somebody knows of anything like this then please let me know, but =
so far searches have not found anything.

I believe Arthur Murray's Mind project is a very similar project to =
yours. I even saw his book last time I was at my university bookstore.
 
S

SwarmShepherd

One part of the concept as I am working with it is to have the "Class
Server" (data holding methods are static) build a
"Vocabulary" of all the Keywords used in all current units of what is
simple Ruby Hash. By convention the information is
built in a structurally not very complex way - here is a small part of
this from the work:

def Acorus_calamus.parts_used_#02
at = "Dried rhizome"
ac = {:HERB_PART=>:RHIZOME, :HERB_FORM=>:DRIED}
[{:SATZEN=>[ac], :SOURCE=>[at], :REF=>1}]
end

def Acorus_calamus.general_#03
image = "http://pharm1.pharmazie.uni-greifswald.de/
allgemei/koehler/koeh-006.jpg"
at1= "Calamus, or Sweet Flag, combines demulcent effects
of the mucilage with the carminative effect of the volatile oil and
the stimulating effect of the bitters."
at2, at3 = "", ""
ac1 =
{:QUALIFICATION=>:COMBINES, :ACTION=>:DEMULCENT, :ACTION_DUE_TO=>:MUCILAGE}
ac2 =
{:QUALIFICATION=>:COMBINES, :ACTION=>:CARMINATIVE, :ACTION_DUE_TO=>:VOLATILE_OIL}
ac3 =
{:QUALIFICATION=>:COMBINES, :ACTION=>:STIMULANT, :ACTION_DUE_TO=>:BITTERS}

bt= "It is thus an excellent tonic for the whole gastro-
intestinal tract."
bc=
{:QUALIFICATION=>:IS_AN_EXCELLENT, :ACTION=>[:DEMULCENT, :CARMINATIVE, :STIMULANT], :BODY_SYSTEM_SUB=>:GASTRO_INTESTINAL_TRACT, :HERB_PART=>:ALL}

ct= "It may be used in dyspepsia of all kinds, in
gastritis and gastric ulcers."
cc=
{:QUALIFICATION=>:MAY_BE_USED, :ACTION=>[:DEMULCENT, :CARMINATIVE, :STIMULANT], :CONDITION=>:DYSPEPSIA, :CONDITION_DUE_TO=>[:GASTRITUS, :GASTRIC_ULCER]}

dt= "It will stimulate a flagging appetite and help to
ease exhaustion and weakness when there is a digestive involvement."
dc=
{:QUALIFICATION=>:WILL, :ACTION=>[:DEMULCENT, :CARMINATIVE, :STIMULANT], :CONDITION=>[:APPETITE__LACK_OF, :EXHAUSTION, :WEAKNESS], :BODY_SYSTEM=>:DIGESTIVE_SYSTEM}

et= "It may be considered a specific in colic resulting
from flatulence."
ec=
{:QUALIFICATION=>:IT_MAY_, :ACTION=>[:DEMULCENT, :CARMINATIVE, :STIMULANT], :CONDITION=>:COLIC, :pREPARATION_IS_A_SPECIFIC=>:TRUE, :pATIENT_HAS_ESPECIALLY=>:FLATULENCE}

[{:REF=>1, :SOURCE=>[at1, at2, at3, bt, ct, dt,
et], :SATZEN=>[ac1, ac2, ac3, bc, cc, dc, ec]}]
end

=============================================================

The "Vocabulary" built has 3 levels that must be "Ajaxed" on the
client side - and this enables a front-end that uses
simple 3 columns to build small sentence parts by doing no more than
picking from relatively short lists. Clearly the
percent of "new" keywords decreases as the use of the system goes on
and the "vocabulary" is extended to cover more and
more cases. Not "Rocket Science" is only common sense.

Yes, there is an existing Tk based interface to do this that has been
working now for months. Result of this is that a simple "Data Agent"
is built and "sent" to the ServerSide - these are the small script
files.

I am glad to share also example Agent files of both types.

======================

Skip now to some "advantages" that we see some of us. No big working
system yet. Simple - this is conjecture - but all pieces have been
built and tested but across several domains in 5 years as changes made
to what experience is teaching.

It is rather like there are "no moving pieces" - no deep logic - only
many little units of (in our case) outside contributed information
(data) and outside contributed assertion "system" (not big deal - but
multiple assertions) which is the 'rule' side.

Then you have a "swarm sender" class and a "swarm reader" class both
simple.

The "Helper System" is where most of the work is done. Favorite
example of power here is that all "Units" from universe is converted
to One Unit system (metric) and all calculations and downstream work
is then so much simpler. So he Helper Library is where in set up
system an increasing amount of the work is done.

One thing maybe clear from this - that if all units are set up to be
handled in one domain - then is available for all other domains so
there is a nice way for a bigger system to get built up layer on
layer.


Ruby has made all of this doable and really pretty to the eyes of this
old-school programmer having fun.

If somebody would like to see example agents will be glad to provide.


Thank you!
 
S

SwarmShepherd

I think just now a "example vocabulary" - that is built automatically
might be interesting for somebody that is trying to
follow all this:

=================================================================================
CONSOLIDATED MASTER LANGUAGE FOR LIBRARY: XxxxLibrary
==================================================================================

METHODS
1). names_primary
2). parts_used
3). general
.......
7). preparation_and_dosage
8). collection
9). caution
10). images
names_primary
1). [:GROUP, [:BOTANICAL, :LANGUAGE, :REFSET]]
2). [:BOTANICAL, {:KEY=>[:FAMILY]}]
3). [:LANGUAGE, {:KEY=>[:DEUTSCH, :ENGLISH]}]
4). [:REFSET, {:KEY=>[:REFSET]}]
parts_used
1). [:GROUP, [:HERB, :INFO, :pREPARATION, :REFSET]]
2). [:HERB, {:KEY=>[:FORM, :pART]}]
3). [:INFO, {:KEY=>[:NOTE]}]
4). [:pREPARATION, {:KEY=>[:FORM]}]
5). [:REFSET, {:KEY=>[:REFSET]}]
general
1). [:GROUP,
[:ACTION, :BODY, :CONDITION, :HERB, :INFO, :pATIENT, :pREPARATION, :QUALIFICATION, :REFSET]]
2). [:ACTION, {:KEY=>[:ACTION, :DUE_TO, :GENERAL, :SPECIFIED]}]
3). [:BODY, {:KEY=>[:SYSTEM, :SYSTEM_SUB]}]
4). [:CONDITION, {:KEY=>[:CONDITION, :DUE_TO, :EXAMPLE]}]
5). [:HERB, {:KEY=>[:pART]}]
6). [:INFO, {:KEY=>[:NOTE]}]
7). [:pATIENT, {:KEY=>[:HAS_ESPECIALLY]}]
8). [:pREPARATION,
{:KEY=>[:FORM, :INTERNAL_EXTERNAL, :IS_A_SPECIFIC]}]
9). [:QUALIFICATION, {:KEY=>[:QUALIFICATION]}]
10). [:REFSET, {:KEY=>[:REFSET]}]
actions
1). [:GROUP, [:ACTION, :BODY, :REFSET]]
2). [:ACTION, {:KEY=>[:ACTION]}]
3). [:BODY, {:KEY=>[:SYSTEM]}]
4). [:REFSET, {:KEY=>[:REFSET]}]
preparation_and_dosage
1). [:GROUP,
[:DOSAGE, :HERB, :pATIENT, :pREPARATION, :pREPARING, :REFSET]]
2). [:DOSAGE, {:KEY=>[:DOSAGE, :FREQ, :pERIOD, :UNIT]}]
3). [:HERB, {:KEY=>[:UNIT]}]
4). [:pATIENT, {:KEY=>[:STATE]}]
5). [:pREPARATION, {:KEY=>[:CONSUMED_AS, :FORM, :INTERNAL_EXTERNAL]}]
6). [:pREPARING,
{:KEY=>[:HERB_VOLUME, :INFUSION_PERIOD, :INFUSION_TIME_UNIT, :MENSTRUUM, :MENSTRUUM_UNIT, :MENSTRUUM_VOLUME]}]
7). [:REFSET, {:KEY=>[:REFSET]}]
collection
1). [:GROUP, [:COLLECTION, :HERB, :INFO, :REFSET]]
2). [:COLLECTION,
{:KEY=>[:DRY_HOW, :OPERATION, :OPERATION_BEFORE_DRYING, :SEASON_FROM, :SEASON_TO, :WHEN]}]
3). [:HERB, {:KEY=>[:pART]}]
4). [:INFO, {:KEY=>[:NOTE]}]
5). [:REFSET, {:KEY=>[:REFSET]}]
caution
1). [:GROUP, [:INFO, :REFSET]]
2). [:INFO, {:KEY=>[:CAUTION]}]
3). [:REFSET, {:KEY=>[:REFSET]}]
images
1). [:GROUP, [:REFSET]]
2). [:REFSET, {:KEY=>[:REFSET]}]


==========================

This is automatically extracted/re-extracted from the data in this
"Class Server"

So 1st colum is the Method
then the "Key Base Word
then the Key_2nd part

experimented with more levels but this works out as pragmatic "medium"
and seems like clear best.

==================

Result is that by selecting from only 3 columns that a client can
build sentences in a natural like language (picking only most of
time. There is a "Seed" system now - so no need to start from
scratch.

There is a built in ability to translate from "Techlish" (technical
english) from the internal format. This avoids And/Or normal
ambiguities. And (not played with much yet) there seems to be a nice
way to translate to multiple natural languages that just falls out.

============
One more note from experience: there is a GROUP+KEY of INFO_META
which supports an interesting direct "client to computer possibility)
as well as a INFO_TEXT keyword that supports person to person
"comment"




Thank you
 
S

SwarmShepherd

Hello,

When I visited here the first time I was very excited to have the
first "agents" executing. I used the term "Boid"
which carries some "heavy AI baggage". This "offended" here some
people, and for that I am sorry.

My project is written in 100%, nice and shiny, is also not too much
more than maybe 2,000 lines so not really very complex (this is the
Server-side only). Other than client-server work (one library:
EventMachine) there are no dependencies.

But since there is so much earnest interest here :) let me tell a
little of the story on how this project started. I am retired now
(3rd time) and have more time...

As somebody that has been loving to program for over 30 years I have
used the "trick" of DSLs (now called) many times in many ways to amaze
various employers (before I knew what it was called). So about 4 1/2
years ago, I was using my trick to build a DSL to do something but the
language kept getting more and more complex (unit conversions a
headache).
So I do what I do and how I do it and one morning after breaking head
on this I ask "what if instead of big complex DSL" I break this down
somehow into smaller simpler ones (a goal of this system is that
anybody can contribute rules or data from browser). Well this lead to
using many small DSL pieces - and setting everything up so the
building of the agent can be kept also very simple (it follows). Now
all the complexities and nastiness of common things like "unit
conversions" is removed to one organized place - to the helper Library
(like Ruleby uses).

Now things just became much more fun! There were "system" waves of
these program units to set things up (not from clients) and many
things evolved in a very natural common sense way - just also very
different.

There are some 9 Functions (large classes or modules) in this system
as currently structured. Each one is now pretty
simple. The most distinguishing feature of this system is, I believe
is the use of many small program parts. The advantages of this are
clear to me after working on this but not so simple to explain.

Above, in my messages I cut real snippets from real operating code. I
offer to make an interesting bet with anybody about any of it that it
isn't real code that works with Ruby 1.9.1 interpreter. Here are the
major functions:

1. "Class Server" which logically enough serves classes that have
static methods. Also builds a vocabulary from all
GroupKeyWords + all Keywords + all data items ever assigned. Does
simple things like giving a list of commands and
such for obvious "handshake" purposes.

2. There is a Agent Launcher

3. There is a HelperLibrary which agent makes a "visit" to each
"flight" - this is were the work is done - the agent "sends message"
and gets responses - no brains in the agent as said - near pure data
or near pure rules.

4. There is a Agent Reader

5. There is a WhiteBoard System - have contributed this already - MF
helped me with the "method come from" code.

6. Don't forget the body of Agents - they are simple text files with
multiple DSL / subsections

7. There are records of all variable (success, value, exceptions...)
"transactions" with the overall result of assertons (pass / fail) and
not too difficult to understand

8. There will be a "control panel" that allow drill down into the
nitty griddies of the sets of assertions that all went toward arriving
at a single (maybe) shiney conclusion (like a best fit product, or a
compatibility issue, or a possible inter-action of two drugs... in
short the problems being solved)

9. Client Side (in future) interface units to allow "experts" to
contribute Data or Rules (by way of causing an agent to be built)

=============================================

There are is no free lunch. First - Data must be loaded into a
strict format - see above somewhere another posting - but it is also
very very flexible as you are more or less "talking to the computer"
in a natural like language - hope this doesn't offend anybody here -
but is true! I have screen captures of the working system if you
don't believe me.

Second - somebody somewhere sometime must contribute the rules. This
is what is, perhaps, so interesting! Your clients, people in field,
authors, your aunt jill, or anybody with a enabled cell phone / or
laptop, or tablet, or even a desktop can contribute - he or she - is
doing something he or she has been doing since age 3 or so - he or she
is building sentences.


Thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Hi Folks 3
Hi there 0
Who are low code solutions designed for? 1
How to go about building a crud app when you are a noob 1
Hello there 3
Dynamic programming 3
Hey there I'm Burhan Chaudhry 1
Ruby for Java Folks? 9

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top