Jump to content


A.I. in an MMORPG


15 replies to this topic

#1 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 03 June 2007 - 06:43 PM

Hi, if you have read the games forum, you'll know I'm planning on creating my own MMORPG. However I was thinking of including characters that automatically respond to certain requests or comments. Is there any way I would be able to do this?

Any suggestions would be much appreciated.

#2 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 04 June 2007 - 08:48 AM

Depends what you want to do. Parsing natural language is quite hard, but its quite easy to recognise certain expressions.

It really depends what you want to do?

#3 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 10 June 2007 - 01:43 PM

For example, if a player asked a bartender for a beverage, how would you get them to respond? e.g./juice please = coming right up.

#4 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 10 June 2007 - 09:51 PM

Depends on what you want the player to be able to say.
Its easy to recognise 'juice', but the context is much more difficult.
For example, that player could ask, "what sort of juice is it?", the response "coming right up" makes no sense.

If you're using c and you want to recognise juice in a string use strstr(player_input, "juice") != 0;
Or STL/C++ std::string find
   string player_input( "blah blah juice" );
   string::size_type loc = player_input.find( "juice", 0 );
   if( loc != string::npos ) {
     cout << "coming right up" << endl;
   } else {
     cout << "only juice here" << endl;         
   }

What level are you aiming for?

#5 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 11 June 2007 - 01:02 PM

Reasonably advanced, it has to make sense. Like you said it has to be in context, but I have no idea where to start with it.
I often wanted to drown my troubles, but I cant get my wife to go swimming.
(jimmy carter)
-------------------------------
The future is C++

#6 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 11 June 2007 - 01:22 PM

Define a set of questions you can ask and let the player select one. (Just like all the old lukasart adventure games.)

The response can be a simple question->answer table, or some more logic, or counter questions with a list of possible answers for the player.

#7 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 11 June 2007 - 01:27 PM

I'd say that if you have to ask the question its more complicated than anything you'll be able to achieve.

To get you started, look here Natural language processing. Thats far to complicated.

A simpler more limited approach is to define a grammar of the things you want your barkeeper to understand.

#8 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 11 June 2007 - 02:55 PM

I'll see what I can achieve in terms of recognising more than one word. Thanks for putting your time aside for me, you have been extremely helpful.
Thanks again
Ant
I often wanted to drown my troubles, but I cant get my wife to go swimming.
(jimmy carter)
-------------------------------
The future is C++

#9 JRowe47

    New Member

  • Members
  • Pip
  • 6 posts

Posted 19 June 2007 - 09:38 AM

AIML is your best bet. Everything you could possibly want for half-dumb( as opposed to totally dumb) NPC interactions.

You'd need to abstract things a bit, but for regular conversational stuff, I see no reason why a distributed computing setup wouldn't be doable, to carry the load away from your main server application. It would be very easy to set up a unique "personality" for every NPC by reusing AIML libraries. Hundreds of chatbots embedded into your NPCs... yummy thought, eh? 0.o

Obviously quests and whatnot should have their own parsers, but as far as "fluff" content goes, I think it would make for a great addition to any RPG, not just of the MMO variety.

http://www.alicebot.org/ to get started.

It can be pretty much plug and play to start with, but for any type of serious application, you're going to have to modify whatever source code you choose and optimize the heck out of it.

#10 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 19 June 2007 - 07:07 PM

Interesting! Now that is handy, as firstly it doesnt pressurise the server and secondly I dont have to worry about too much programming. Is there any way you can modify the responses?

P.S. Fantastic idea for general conversations with built in characters!
I often wanted to drown my troubles, but I cant get my wife to go swimming.
(jimmy carter)
-------------------------------
The future is C++

#11 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 19 June 2007 - 07:41 PM

12ant34 said:

Interesting! Now that is handy, as firstly it doesnt pressurise the server and secondly I dont have to worry about too much programming. Is there any way you can modify the responses?

P.S. Fantastic idea for general conversations with built in characters!


Read the website specifically the parts about aiml

#12 fhein

    New Member

  • Members
  • PipPip
  • 10 posts

Posted 19 September 2007 - 01:42 PM

Are you sure you really need an NPC AI in your mmorpg? I mean, unless you spend _alot_ of work on it, players will still be able to spot it as a non-human player in seconds. And more importantly, do you think players will enjoy talking to a chat bot the first time they meet? A week later? What about after six months playing your mmorpg and having to type a whole sentence just to buy a glass of juice every day?

The smart players will figure out that you can write "buy juice please" (or something) instead of "I'd like a glass of cold refreshing orange juice, please" if the result is the same. Heck, they would make a macro saying it if your game allows.

I think the reward you'll get for implementing an impressive chat AI with lots of personalities is that your players are going to hate you. Sorry to say, but I think you really have to think this through. Instead I think you should put time into developing means to make the player's life easier, like a good macro function (Without giving away too much ofcourse. Don't want everybody to write an all-powerful macro turning the whole thing into a one button game :))

After all, people play mmorpgs to interact with other people, not computers :)

#13 gardon

    Valued Member

  • Members
  • PipPipPip
  • 282 posts

Posted 25 October 2007 - 04:28 AM

I have experience with 2D (which is why I'm always asking 3D questions because I suck at it) and have used AI before.

fhein is right, the idea of a MMORPG is to interact with other players. Just do a prompt system:

1) Player clicks on Bartender
2) Bartender says: Hello, Welcome to my Pub.  What are you looking to do?:
            Buy a drink
            Nothing, just wanted to talk :)
3) Player clicks on one of the two choices that appear on his screen:
            if choice 1) Pull up an inventory menu of the drinks to choose from
            if choice 2) Exit the conversation / dialog

Of course it will depend on how you are implementing your game and different interactions, but it's easy if you just limit the options. Players come to the bar for a reason: to buy beer (or something else you might implement). Why have the bartender bullshit you for a while if it's just going to delay your time in getting the beer?

Or you could have some really new uber idea that needs the AI to make your game the ultimate one out there.

Great man, go for it. But also realize that it will take processing time on your server. Everything takes clock cycles. Limiting your AI will not only save you production time, but will speed up the game.

#14 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 20 February 2008 - 10:14 PM

Yes, server lag will be a huge issue. However, certain services in the game will probably REQUIRE it. The perpose of the game is based around realistic WANTS as opposed to NEEDS. Such as services, food, drink, products,etc... This task is probably too big for me and my budget, however hypothetically it was just a plan.
I often wanted to drown my troubles, but I cant get my wife to go swimming.
(jimmy carter)
-------------------------------
The future is C++

#15 onyxthedog

    Senior Member

  • Members
  • PipPipPipPip
  • 467 posts

Posted 20 February 2008 - 11:07 PM

Runescape doesn't let you truly control what you say, but does let you feel like you have control, kind of. It isn't the best way, but it does easily allow the server to serve 100,000+ players at once. Sometime you have to sacrifice the "cool factor" for effeciency reasons, but hey what do I know I am a 7th grader.

#16 12ant34

    Member

  • Members
  • PipPip
  • 36 posts

Posted 22 February 2008 - 05:27 PM

You probably have just as much knowledge as the rest of us, if not more because of your experience with non-stop gaming! Perhaps the *option* of beverages would save time, effort, memory and money instead of actually *asking* verbally for them.
I often wanted to drown my troubles, but I cant get my wife to go swimming.
(jimmy carter)
-------------------------------
The future is C++





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users