From: SwarmShepherd Date: 2011-04-26T08:55:33+09:00 Subject: Re: Are there other Ruby folks using "distributable dynamic agents" for project work? 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,