Page 1 of 5

MASSIVE like AI program

Posted: Fri Jan 02, 2004 12:41 am
by mr_rob
After watching the Lord of the Rings "Inside the Effects" videos, I was filled with an urge to make a MASSIVE like AI program. For those that did not watch the videos, MASSIVE is a program written for LOTR to simulate large armies in battle. The warriors decided what to do off of sets of "brains". These brains had decision nodes to calculate what to do.

Now of course this program I've begun writing is no where near the level of quality of MASSIVE (it had 80,000 digital warriors in the prologue scene in FOTR). But with the support of the community I believe it can become at least a good and/or fun project.

How does this relate to Blender? Blender is the renderer that will render the scenes that are generated by ARtificial Life Simulator (or ARLS).

I'm am not a beginner level C++ coder. I have programmed in C++ for 3 years and have experience in OpenGL and Windows programming. But I've never tried artificial life simulation. That's why I ask for community support.

If you are interested, please email me (my gaming email):

Also here is a link to the LOTR "Inside the Effects" videos:

Thank you for your time,
J. Pennington

Posted: Fri Jan 02, 2004 4:08 pm
by Dani

Great news!

I can't do anything more than support you mentally and perhaps some testing!

I hope you get this project on solid wheels!

best of luck!

Posted: Fri Jan 02, 2004 5:19 pm
by mr_rob
All support is appreciated, Dani! I'll make a website for ARLS soon, once it matures some.

Posted: Fri Jan 02, 2004 7:31 pm
by kencanvey
:D Ha, Just finnished watching LOTR2 boxed extended edition (Xmas pressie), and thought I would do some Blending, after watching the how they did it dvds, I really hope you get this going, I also can only give mental support and testing time, so count me in if you need that sort of help.

Good Luck


Posted: Sat Jan 03, 2004 4:31 pm
by mr_rob
The ARLS website is up but it's a little lacking in features. Once ARLS matures more content will be added. Also, it's on my ISP webspace so the name is somewhat cryptic.


I just finished my SourceForge project registration request for ARLS. Sometime within 2 business days I'll have their reply.

Posted: Sun Jan 04, 2004 2:23 pm
by tredee

I have just wrote to you to express my happiness to see an AI related project starting in blender.

I proposed quite the same approach in a thread on forum...

so ... consider this as a proposal to join the effort!

Andrea aka tredee

Posted: Sun Jan 04, 2004 10:08 pm
by mr_rob
Andrea, are you a C/C++ programmer? I tried to read that thread using the Babel Fish translator, but it couldnt translate all of the words.

I appreciate all support, I'm hopefully going to get a sourceforge site for ARLS.

Posted: Mon Jan 05, 2004 3:55 am
by Money_YaY!
mr_rob. All that I ask is that you build a better web site or have somebody do it for you. As a clean work surface will attract far more atraction.

The dynamic rig is great, I sugest that you cheack out the current Wired magazine, it has the exact animation system that was your insperation detailed on how the inner working of it work. It uses life form cell data to create a different sceen everytime, and to tell it's self where and how to respond to punch and whatnot. It is the Wired magazine with the red cover near the back.


Posted: Mon Jan 05, 2004 4:18 am
by kino
mr_rob wrote: I appreciate all support, I'm hopefully going to get a sourceforge site for ARLS.
hi mr_rob
if you want you have all my support, i have php and html know-how
i cannot help in development i know just some python and blender ;)

a good place is to open a new project here at :)
and a presentation site where you want, but i can host it.


Posted: Mon Jan 05, 2004 4:36 am
by tredee
Andrea, are you a C/C++ programmer? I tried to read that thread using the Babel Fish translator, but it couldnt translate all of the words.
Yes, sure ... I am mainly a C++ programmer... even if I like all object oriented languages (python, ruby, C# etc..) ... I am not a fan of "only one language for me" man concept.

what I like in the approach of beyond is that developers have developed some design patterns on it (their papers worth a read).

btw ... I am actually involved as a researcher in AI on embodied agents (robotics) so I see this as an opportunity to contribute to blender while studying/working, and not only in my spare time ... see (not well mantained at now).
My first interest is in behaviours constructed upon fuzzy logic ... It is a great tool/tecnique to model behaviours of an expert agent.

kind regards...

Posted: Mon Jan 05, 2004 2:22 pm
by harkyman
There was a discussion about this on elYsiun over a year ago. You can read it here: ... ht=massive

For your convenience, I'll reproduce my comments here, which pretty much stand as is. I've added some things to the algorithm since then to make it more comprehensive:

...What you need to figure out is the battle dynamics of a crowd. What you need is a sort of cellular automaton system, like this...

Each actor (warrior, whatever) follows this set of rules, reevaluated each frame:

Code: Select all

Are you engaged with an opponent (within attack range) 
   yes { Are you currently in the middle of a combat technique? 
      yes { continue that technique } 
      no { combat logic and begin next technique } 
   no { move(moveweight()) } 

moveweight { //determine which direction to move 
   take into account { 
      command and control instructions //retreat, rally, etc.
      the nearest unengaged opponent 
      the average location of all opponents 
      formation restrictions //unit coherence rules
      waypoints/goal locations
   return direction 

personalstrategy { 
   seek out the following conditions { 
      high ground 
      physcial cover 
      proximity to allies 
   return strategydirection 

physicalconstraints {
   take into account {
      terrain following
      object avoidance
   return phsycialconstraints

Each actor can have different strategic capabilities, different weights and tolerance values to any of these (and more) parameters, giving you the ability to create armies with varying fighting styles, skills and strategies. A few simple rulesets can generate some awesomely complex behavior.

Once you can make two groups of dots swarm across the screen and engage each other in realistic battle formations, then you start putting in the mocap, the hand-to-hand combat simulation, etc. Just the other day I was wondering if WETA could be persuaded to release Massive as open source. Ha! This is a huge project, and I wish you luck.

=====End Quote

Things I've thought of since then:

1. Blender's NLA and Action Blending would work well with a combat system like this. Although my intial thought was that each hand-to-hand encounter should be precalculated, I've changed my thoughts on it. The special feature exposition of Massive shows what they call "mugging" behavior, which is a third or fourth party interceding into an ongoing encounter. With precalced encounters, this is not possible. Dynamically generating encounters allows this, as well as other interuptive behaviors (c&c retreat, charge, etc.)

2. The nice thing about an algorithm like this is that you can tackle it piecemeal, extending functionality once you have each stage working. One team member can work on the code for moveweight(), having their math push around dots on a screen. Someone else can simultaneously work on personalstrategy(), building that trickier logic on it's own with single actors. Another coder can be working on pathfinding/object avoidance. Or a single person could tackle each one as a discreet project.

I think that this is a superb idea, and doable, too. The easiest part, I think, is the logic of the individual behaviors. Next hardest is the pathfinding/terrain following/object avoidance, but there are resources and much stuff on the net about these. The toughest part is the combat logic, which would include the actual character animation. To get it right, it would have to be mo-capped, with a set of different moves for each combination of opponent and weapon types.

I'll be watching this thread to see what develops.

Links to read

Posted: Mon Jan 05, 2004 10:30 pm
by thornae
mr_rob, kudos for taking this on. I hope you're prepared for what a massive (npi) task it's going to be. That said, it's very do-able. The makehuman project is also a huge undertaking, and they've just got to 1.6.

Anyway, enough fuzzy stuff. The first thing to do here is some research, so as not to reinvent the wheel. AI is a popular subject, as is games and game theory. So I figure the first place to look would be at the AI in some games.
Liquid War is as good a place as any to start. It uses a large "army" algorithm for its basic behaviour, and there's a good section on how it works.
Next, FreeCiv is a fairly mature project with well commented code.
AI itself is a pretty popular CS subject. Here's some AI libraries, and a large scale neural net (I think) called OpenCyc. There's also Narval and the Robocup Soccer Simulator for perusal.
As far as moving the AIs around in their environment, the Hola particle simulation may be of some use.
Other links that look interesting: Cyphesis on Worldforge, Realmlifes and a basketball game.

Finally, I found a sourceforge project that sounds like a scaled down version of what you're planning. You may wish to get in touch...

Happy reading!

Posted: Tue Jan 06, 2004 12:53 am
by mr_rob
Thank you for everything guys! I have now received approval for my SourceForge site so I can now post files on the CVS. Also, it has 100 MB of webspace! With PHP support which is something I really need.

Once again, thank you for all of your help!

The site (might be empty depending on how quick you view this):

Posted: Tue Jan 06, 2004 1:22 am
by mr_rob
Kino, I need help with the site badly. I have never done anything with PHP. Are you familiar with PHPNuke or other content management systems?

Posted: Tue Jan 06, 2004 3:08 am
by jonobacon
mr_rob - If you need help setting up PHPNuke, let me know - I have run it a number of times. I havent got time to hack a PHP site together for you, but I can certainly get nuke installed for you.

Mail me at if you are interested.