AI PVPer in Silkroad Online

Started by
2 comments, last by SandSnip3r 4 years, 1 month ago

Introduction


Hello! My occupation is a C++ software developer in autonomous driving. I'm in the process of creating a bot for the old Korean MMORPG called Silkroad Online. I'm very interested in creating the strongest PVP opponent possible using AI. I'm looking for general guidance in the form of people's ideas, topics to research, or similar existing projects that give insights.

Relevant background on Silkroad Online

PVP in Silkroad Online is pretty straight forward. You and your opponent use skills to attack the other player, use skills to buff yourself, and use lots of potions to heal your health and mana. Movement isn't really an aspect of PVPing. From the player's perspective, all you do is press a button to use a skill, and if you're out of range, the character will automatically run to the target if out of range, then use the skill. During the fight, a character can be under certain statuses where they cannot do anything, have lower defense, or have lower damage for example. Some character builds switch between weapons frequently throughout the fight to use skills from different weapon masteries. Skills have cool downs which are of varying lengths. Damage is not a simple subject as I think the formulae are not yet completely understood. The skills that an enemy has aren't apparent until you witness them use the skills.

Capabilities of my bot

My bot acts as a network proxy between the game client and game server. All communication between the two is observable. I can also inject any network data as if the player were controlling the character or if the server were sending updates. Therefore, just about any information that can be seen in the game client, I can also have. The bot is an event-driven architecture. When a packet arrives from the client or server, it's distributed to all subscribed components who then parse it and act upon the data.

First, least dynamic approach

Currently, I'm in the process of hard coding an algorithm to fight for a specific character. I'm basically transcribing my human intuition into code. This is a very manual process and is limited to my knowledge. For example:

  • I define a set of buffs that I want the character to maintain during the fight
  • I define buffs and attacks with certain priorities to use when the enemy character is in the normal state
  • I define buffs and attacks with certain priorities to use when the enemy character is knocked down or in a stunned state
  • I define buffs or heals to use when health or mana falls below a certain level

Idea of a better approach

Here's where I'm looking for ideas. I would like to pursue a more general algorithm where I can search through the space of possible actions and choose the best one given the game state. This seems like some kind of behavior graph algorithm is the way to go. I'm not sure after this point. I guess one of the limitations is that the damage that a skill might cause isn't known ahead of time. In practice, I could collect some sample data to build estimates. I'd love to discuss with everyone what's possible in this direction.

What's AI without machine learning?

I am always bewildered by the concept of machine learning taking approaches that humans would've never thought of. I'd love to eventually bring some kind of machine learning into my project. For example, the idea of two AIs fighting each other and learning how to beat each other. I've taken one machine learning course, so I'm hardly skilled in the field. As far as I can tell, I see a few obstacles:

  1. The dimensionality of this problem is quite high. There are hundreds of skills to choose from and probably tens of states that any character could be in.
  2. Things are time dependent. For example, if you think that the opponent is almost dead, it might be important to use a lower damage skill that will inflict damage more quickly.
  3. Machine learning algorithms seem to require a huge amount of data If this were to be trained in realtime, it might take an unrealistic amount of time. A counterpoint from me is that I could collect enough data to write a simulator to create huge amounts of training data

Conclusion

If you have any ideas or general pointers on what I should research, please do share. If you have any questions, please ask. If you'd like to cooperate on this project, I'd love that too. Thanks for reading!

Advertisement

If you don't know how to program AI, then ML is a cheat that makes you feel more powerful but is really just admitting you don't know what the fuck you are doing.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Thanks for the constructive comment! @IADaveMark I agree. I mean, that's implied by the name. Rather than learn how to solve the problem myself, the machine will learn how.

This topic is closed to new replies.

Advertisement