Author Topic: AI behaviour discussion  (Read 1760 times)

Primordial

  • Traveller
  • *
  • Posts: 40
    • View Profile
AI behaviour discussion
« on: August 12, 2011, 02:47:59 pm »
I mentioned AI behaviours in my thread on the General Discussions sub-forum, which is the basis for this thread. Seeing as Planeshift seemingly seeks to simulate an active world I thought that creatures could be given snippets of code which generally affect their behaviour. Note: I am not a programmer, so I'm not sure how well this would work in actual practice, however so I'll leave it open as a general categorical classification of behavioural suggestions list.

I'm attempting to keep the behaviours simple so that they can be fairly easily coded, and also mixed and matched, also to lessen the server strain so that it's not attempting to compute numbers of overly-elaborate actions at one. These are very sketchy initial ideas.

The idea is to deviate from 'animals and creatures are only there for XP farming and will do nothing if not bothered', rather to have them interact with each other and the players, according to given behaviours, thus increasing dynamic conditions in any given area and lessening predictability of situations.  

Pack/Herders
Move/act in groups, will not stray beyond a certain radius of a pack leader unless forced to flee, at which point they will do so and then attempt to re-unite with the herd/pack. A 'leader' may be chosen, if the leader is killed all entities flee in random direction for certain time before a new leader is chosen, and all attempt to regroup at that entity.

Solitary
Moves and acts alone.

Territorial
Designates a variable area of land that it considers it's territory, and that it will protect against intrusion.

Rover
Will wander at random

Predator
Will attack and attempt to kill other entities it comes across. Potentially combined with pack/herd else solitary. May be territorial or roving.
I reality , a predator will gauge it's kills on opponent size or other factors. I'm unsure how something like this may be coded, however. Maybe relative size identification? within certain range an animal will attack, if not, will not?

Fearful
Will generally run away from things of equal or larger size.

Curious
Will approach and linger around other entities it comes into contact with before moving on. May or may not be aggressive.

Stalker
Will stalk an entity. May or may not be aggressive. Seeks to maintain a relative distance between itself and the target. Potentially before attacking, based on creature classification/rules.


Situations this type of behaviour may lead to:

Supposing Gobbles were given pack and territorial behaviours. You might find that another creature, or unwary player, passing by them would find itself on end of a multi-pronged attack. If the player or creature is strong or lucky enough, it may kill all the Gobbles, or kill the leader and send all gobbles scattering in all directions to later regroup or be hunted down. Or else the Gobbles continue to, in effect, rule a certain area of land.

A player or entity may be going somewhere.
They draw the attention of a predatory, roving, pack and must flee or fight.
____


I'm quite sure that there are more behaviours than this that could be used, and that the suggestions I have made can be discussed and improved, so I will open the thread to suggestions and debate:

Rules:

Keep it simple: if the server is forced to calculate several entities with very individualised, complex behavioural pattern, while also calculating everything else, it will slow it down. It's better to have recognisable, basic, interchangeable patterns to follow which will allow entities a recognisable level of diversity while not crashing the server. due to strain.

Mask

  • Hydlaa Resident
  • *
  • Posts: 94
  • Without imagination, we never will go anywhere...
    • View Profile
Re: AI behaviour discussion
« Reply #1 on: August 12, 2011, 04:01:54 pm »
Looking at the wiki, you might find http://planeshift.ezpcusa.com/pswiki/index.php?title=Tribes and http://planeshift.ezpcusa.com/pswiki/index.php?title=Tribe_Rework

Wait until GSoC is over, maybe we see something of these ideas already implemented.
It's just an idea, it might contain nonsense until proper sources are given.

First rule of programming: Documentation, Documentation, Documentation.

Primordial

  • Traveller
  • *
  • Posts: 40
    • View Profile
Re: AI behaviour discussion
« Reply #2 on: August 12, 2011, 04:59:52 pm »
Looking at the wiki, you might find http://planeshift.ezpcusa.com/pswiki/index.php?title=Tribes and http://planeshift.ezpcusa.com/pswiki/index.php?title=Tribe_Rework

Wait until GSoC is over, maybe we see something of these ideas already implemented.

Hmm, this is very interesting. I'm slightly confused though: is this applicable only to 'sentient' creatures? Or does it apply to sub-sentient too?

Mask

  • Hydlaa Resident
  • *
  • Posts: 94
  • Without imagination, we never will go anywhere...
    • View Profile
Re: AI behaviour discussion
« Reply #3 on: August 12, 2011, 05:12:13 pm »
From what I can tell, it's to model tribe behaviour. The code doesn't care about sentinent or not.
It's just an idea, it might contain nonsense until proper sources are given.

First rule of programming: Documentation, Documentation, Documentation.

Primordial

  • Traveller
  • *
  • Posts: 40
    • View Profile
Re: AI behaviour discussion
« Reply #4 on: August 12, 2011, 05:28:23 pm »
Looking through it and other docs, it seems to be mostly to do with (settings wise) sentient creatures and communities. It's very interesting - I hope it works out well in the end, I'm not sure how many other games are attempting this type of thing.
I still wouldn't say it fits for general creatures though - I can't see, for instance, a Trepor sending other Trepors out to get resources. Although if any of the Devs could chime in on whether you're all light years ahead of me on these ideas, please do.

Mask

  • Hydlaa Resident
  • *
  • Posts: 94
  • Without imagination, we never will go anywhere...
    • View Profile
Re: AI behaviour discussion
« Reply #5 on: August 12, 2011, 05:38:56 pm »
Why? A trepor queen could send out other trepors to gether resources needed to make the hive grow, while trepor-warriors guard the queen and the workers. It is more difficult for hunting creatures, e.g. ulbernauts.
It's just an idea, it might contain nonsense until proper sources are given.

First rule of programming: Documentation, Documentation, Documentation.

Primordial

  • Traveller
  • *
  • Posts: 40
    • View Profile
Re: AI behaviour discussion
« Reply #6 on: August 12, 2011, 05:50:40 pm »
Fair point actually.

I'm interested: how do the tribes begin, then? If I've read correctly, they expand and become more numerous as they go, based on  their actions and environment. If one dies they are replaced based on stockpiled resources. So when a tribe's stockpiles are exhausted, they can, essentially, be eradicated from existence, and if so what happens then? Does the superclient just spawn an entirely new tribe from scratch?

Sarva

  • Game Masters
  • Hydlaa Notable
  • *
  • Posts: 621
    • View Profile
Re: AI behaviour discussion
« Reply #7 on: August 12, 2011, 07:24:38 pm »
Yes the tribes actions for mobs will include things such as trepors. In fact the trepors at the Trepor field have some very, very basic aspects of tribe actions. Hopefuly this will be much better in the future.

Phantomboy86

  • Hydlaa Notable
  • *
  • Posts: 584
  • Sarva used to own the deed to my soul.
    • View Profile
Re: AI behaviour discussion
« Reply #8 on: August 12, 2011, 09:26:55 pm »
Hypothetically, way down the line assuming the game isnt shut down and things like this get implemented, wouldn't magical ways effect certain animals and monsters? Like a Brown Way person might be able to just slip by completely unnoticed, or even welcomed, while someone with power in maybe Red or Dark way could simply scare the monsters off? After all, what planted humans on top for sure was mastery over fire.

Aramara Meibi

  • Veteran
  • *
  • Posts: 1062
    • View Profile
Re: AI behaviour discussion
« Reply #9 on: August 12, 2011, 09:36:09 pm »
After all, what planted humans on top for sure was mastery over fire.

too bad you're not human :P

The tribes concept is extremely exciting. I can't wait to see it implemented after GSoC. Here's to those working on that project  \\o//
all blessings to the assembled devotees.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: AI behaviour discussion
« Reply #10 on: August 13, 2011, 09:32:22 am »
all that was already possible before. tribes are just a way to allow groups to grow it doesn't manage the single npc. that's already implemented and supports most if not all of the things above. now you would ask why they stay still. the reason is not in the npc management software but it's a purely rules thing. Before we had npc attacking on sight and we still can trigger them easily without a reboot, but the problem was npc where too much strong and so it was decided to disable it for the time being