From: SwarmShepherd Date: 2011-04-25T20:30:24+09:00 Subject: Re: Are there other Ruby folks using "distributable dynamic agents" for project work? 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!