Author Topic: Computational Intelligence  (Read 1982 times)

Kibernetes

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Computational Intelligence
« on: November 10, 2005, 08:34:17 pm »
Greetings everyone!

    I did not have a formation on computer games technology (my core formation was in decision support quantitative methods), but it is not hard to see that a game like PS involves many problems that can be well solved by a Computational Intelligence approach. So I decided to start this topic - of course, the fact that I liked the game very much has had its influence on the choice... :)

Comming to the point:

    The best thing to do when we have a box of technologies to use and another box of problems to solve is to open the box of problems first... so I would ask you to state a few problems that we could solve using CI.

    As an example, one thing that came up when I was writting this message was the fact that NPC behavior could be more seemingly human if they could generate expectations about the future (what could be achieved through the use of a specifically designed bayesian network, for example).

   Due to the fact that I have never taken part in the project of a computer game, I just don\'t know if that idea is wonderful or ridiculous (or anything in between) in this context, so please state some problems and let\'s discuss them here, ok? :)


tangerine

  • Hydlaa Resident
  • *
  • Posts: 192
    • View Profile
(No subject)
« Reply #1 on: November 10, 2005, 11:27:23 pm »
Can you give some examples of the random variables (vertices) of the bayesian network ?

Kibernetes

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Variables for the network
« Reply #2 on: November 11, 2005, 02:32:51 am »
Well, tangerine, if you are talking about the network for generating NPC expectations, it will heavily depend on the type of event we will want the NPC to expect.

    For example: should Harnquist receive the visit of a player character with very few money and who looks at the \"weapons\" table, a network would have nodes like that:

   OBS: Sorry for the format, but we do not have much graphical capacity for drawing graphs in plain text... :)

    Node 1: Action to expect from the player character next time he/she comes

       Output 1: Look at \"Buy weapons\" (70%)
     Output 2: Look at \"Buy Armor\" (15%)
       Output 3: Look at \"Buy Tools\" (10%)
       Output 4: look at other items (5%)

  Node 2 (out from Node 1: Output 1): Action to expect if he/she opens \"Buy Weapons\"

        Output 1: Look and do nothing (45%)
     Output 2: Buy an axe (20%)
      Output 3: Buy a broad sword (25%)
       Output 4: Buy another weapon (10%)

    ...and so on.

(of course, the values of the probabilities shown above are irrelevant, for the initial -\"a priori\" - values will arise from the experience of the developers and the final - \"a posteriori\" - values will come out of the true events Harnquist will meet.)

    It is important to see that, in this case, we would set the network structure as fixed, for the dynamic extraction of the structure from data is tipically very costly (for it is computation-intensive).

    By taking the structure (i.e.: the event independence map) fixed, we will take the network back to its original function: a practical way to represent and calculate conditional probabilities and separate different courses of events.

    The last word on what exactly will be the set of variables is a project decision that will need some discussion.

    We may take a first step with simple problems, like Harnquist\'s expectations on the behavior of his clients. (In the case shown above, he would greet the buyer with something like \'Oh! Just looking or came to take that sword at last?\')

    In the case, variables would all be related to what the character did in the last \'n\' times he/she came and how long did it take since he/she came last time (or between visits).

    We would have to observe players interacting with Harnquist for a while in order to have a more solid understanding of what the variables should be.

    So, here comes the sugestion: Let\'s try to give expectations to our dear smithy? :)

Kibernetes

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Combat Issues
« Reply #3 on: November 11, 2005, 05:33:03 pm »
Greetings again! :)

Another interesting area to use CI with is to put AI in the behavior of monsters and NPCs in combat.

The choice of techniques, the tactical decision making (especially for groups of monsters) and the NPC atitude towards nearby combats form rich material for the use of AI.

One problem is that, as far as I could percieve, the PS combat system is quite simple.

A simple combat system seems to be a good choice, for it is easy to learn and linear to use, but the lack of complexity can reduce the number of decisions one has to make when in battle, consequently reducing the possibilities for AI application.

I may be wrong, but I think that, when calculating the effectiveness of the strikes, the current PS combat system does not take into account factors like the distance of the opponents, their position relative to one another (front, rear, sides), the diference in ground levels (who is in upper ground), etc.

If the system could take more factors influencing combat, it would force combatents into making more decisions during a fight, and it would generate interesting AI possibilities, like monsters that use the environment to better defend themselves (yet never becoming invinceble).

Another way of putting more decisions into the combat system would be to use \"special combat techniques\", like different types of strike to choose.

It would bring interesting possibilities to the game such as the monster detecting (through pattern recgnition) the player\'s preference on the choice of strikes and reacting to it (clever monsters reacting better), and the player having to perceive it and change his/her combat decision pattern in order not to be cut into pieces. :)

Is it possible (and desireable) to increase the complexity of the combat system?
« Last Edit: November 11, 2005, 05:35:01 pm by Kibernetes »

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #4 on: November 11, 2005, 05:59:21 pm »
As a first thing, one could have the MOBs actually use the same attack stances players get to use, as well as trying to flee if the battle looks impossible to win. The latter would, however, require improvements to the player\'s ability to follow an opponent and especially the option to attack when coming within range instead of cancelling the attack completely.

For merchants this could maybe also be used to have them make individualised prices, like if they think the customer will keep coming back, or if they look rich and careless, etc..

I once proposed the use of fuzzy logic to achieve better recognition of situations by the system, but it likely would be too complex to implement just yet; it wasn\'t pursued much, anyway.

Kibernetes

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
I missed an important thing!
« Reply #5 on: November 11, 2005, 07:37:37 pm »
Seytra is right! I forgot the use of stances in combat.

If monsters already have access to stances, we could put them to use it in order to get the edge in combat, according to the monster\'s \"cleverness\".

In what comes to the pricing system, I agree that fuzzy logic would be fantastic! We should be careful, though, not to put too much fuzzy in the game, for it is a little costly to run, so having many NPCs running fuzzy inference systems at the same time could generate performance decreases in the server.

By the way, in which language is PS being developed? If it is C++ or Java I could try to develop a fuzzy inference system for testing. :)

Another less effective but less costly alternative is to use small, yet well projected, neural nets. They are fast to run and only consume time for architeture planning and parameter estimation (but, since we are not in a hurry...).

... and we could put a random number generated daily for each NPC as a complicator for pricing. It is very easy to implement, fast to run and could be funny! :)

Thanks Seytra! :)
« Last Edit: November 11, 2005, 07:40:22 pm by Kibernetes »

Ethan

  • Hydlaa Resident
  • *
  • Posts: 64
    • View Profile
(No subject)
« Reply #6 on: November 11, 2005, 07:51:49 pm »
C++
Wish list summary (under construction)
Your help is welcome!!!
Done : Weapons, Other items, Magic
TODO : a lot ...

Kibernetes

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Give me your style! :)
« Reply #7 on: November 12, 2005, 01:14:49 pm »
Ok! I will try to develop an engine for fuzzy inference systems for you to test its use in the game.

Please, send me any coding conventions, project patterns of choice, interfaces I should implement...

...in other words, please send me your development style, so I can respect it! :)

lynx_lupo

  • Veteran
  • *
  • Posts: 1431
  • Sorbus aria!
    • View Profile
    • Linux pri nas
(No subject)
« Reply #8 on: November 12, 2005, 05:32:06 pm »
http://www.ps-mc.com/docs/index.php/Main_Page
Check the pdf on aerig\'s site.
"Amor sceleratus habendi"- Ovid
"First they ignore you, then they laugh at you, then they fight you, then you eat them." -Godzilla

Kerol

  • Hydlaa Notable
  • *
  • Posts: 574
  • Assets > Asshats
    • View Profile
Re: Computational Intelligence
« Reply #9 on: May 02, 2006, 05:41:50 pm »
I know it is not much appreciated to revive old threads, but I am amazed by the ideas here and I was wondering what happened to the development Kibernetes planned to do. Does anyone know if he is still around or what happened to the ideas?


retired GM leader