Archive for April, 2008

8
Apr

Agent Based Systems Development

   Posted by: admin    in Uncategorized

What used to be my fun side projects has quickly become my job. I’d like to continue that cycle by finding new side projects that are fun and challenging. I also like to find projects that I actually think would be something new and interesting that people would appreciate. An idea came to me recently that brought together a lot of past ideas in a new light. When I did some research on it I discovered that that topic area is called “Multi-Agent Systems” or “Agent Based Systems” http://en.wikipedia.org/wiki/Multi-agent_system

What is it?
Agent based systems have multiple independent entities called agents that can communicate / and cooperate. I was happy to find that there are some applications that exist to do simulations and modeling: http://www.cs.gmu.edu/~eclab/projects/mason/ and some standards on programming these systems: http://jason.sourceforge.net/JasonWebSite/Jason%20Home.php

Why?
The appeal is obvious. This approach is not very well developed in computing and robotics. Communications between systems (agents) are plentiful and always improving. Like with people, multiple systems working together can be much more powerful than thier simple sum.

A new implementation!
All of the multi agent systems modeling apps I found are in Java, I’m starting my project in ActionScript. I plan on extending portions of it to use AIR as well. I like Actionscript due to its natural abilities to communicate and be visual. One of the main focuses of my implementation of the agent based model will be on the monitoring, management, and repair of the complex systems. Even in small Agent implementations that are just for a fancy presentation it’s interesting to see the number agents, their status, type etc.

I won’t type out all of my ideas here. I wanted to just put in a quick note on the subject in case any of my colleagues would be interested in sending me tidbits in this area or following my progress. The new projects will start out at http://AgentBasedSystems.com

I had a need to create an extension to IE. When I did my initial research I couldn’t find anything that seemed to address the subject. Since Internet Explorer is the most commonly used browser on the internet I knew I was doing something wrong. Apparently I didn’t even know the propper terminology to use for what I was doing.

The most basic extension to Internet Explorer is called a “Browser Helper Object” or BHO

just knowing that would have saved me a couple of hours.

A Browser Helper Object is in the form of a .dll that is intended to interact with IE. Other things like toolbars can be built on top of it.

Creating a BHO: anything that can compile a .dll can be used. It’s easiest to find references that are in Visual Studio and C++ or Visual Basic.

Development: The development is deceptively simple once you get started. There are a few basic methods that are required like getSite and setSite. These can both be very quirky so I suggest referring to a tutorial to create these most basic methods: http://msdn2.microsoft.com/en-us/library/bb250489.aspx once you have the basics methods setup you have to get yourself acquainted with a new lirary of features know as MSHTML which allows you to interact with IE and the documents it references: http://msdn2.microsoft.com/en-us/library/bb498651(VS.85).aspx

as usual it helps to have code to look at, I suggest browsing the projects at CodeProject, I found many there that were helpful.

There are a few distinct things that a BHO can do that you can’t do easily with anything else (At least for IE).

  1. Create interaction between the desktop applications and the web
  2. Simulate user interaction, that is transparent to sites.
  3. Bypass cross site security restrictions
  4. DOM manipulation on any site.

I only found 1 boook that even mentioned Broowser Helper Objects, and it was very useful. Unfortunately it’s only for VB

http://safari.oreilly.com/1565926706/ch12-94108#snippet

Once you have the BHO developed, what ties it to Internet Explorer is that it has to be linked to IE in the registry. The process is spelled out in the tutorial I linked earlier. It’s very easy to see if the connection to IE exists by looking at the “Manage Addons” menu.

I hope that helps launch someone starting the process.