bots explained.. a little

Written by  on October 14, 2012 

I’ve been asked several times over the last month or so, about the functionality of the robot ships featured on the mtrek.com game server. There have been a wide range of questions and some requests for programming changes to the bot AI.

In this post, I hope to address some of these questions and requests, and to shed some light on the mysterious “robot” dynamic to this game.

 

What is a “bot” or “robot ship”?

A bot is an AI(Artificial Intelligence)-flown mtrek ship. The JTrek engine powering the mtrek.com server is packaged with source code for server-side bots. Each bot is autonomous and operates with no direct human input. They act according to environmental conditions and execute maneuvers based on a pre-set course of actions with modifiers and percentages to simulate a humanlike margin of error- to include “missing” torp volleys, advancing/retreating at the end or a range to cause an opponent to “miss”, ramming, fleeing, breaking peace, sending messages, etc.

Which bot is the most skilled? Which is the weakest?

Technically, there is really only one “bot”. The same program is used to operate every bot. When the program “spawns” a new bot, it randomly selects a name from a pool of several hundred and then proceeds to select a ship class at random as well. Note: In the stock JTrek source code, the bot AI would also randomly select a skill level (1-5) with “1” being the most skilled and “5” being the least. I have since modified the code to make all of the bots spawn with a skill level of “1”.

Why are there so many bots running? and sometimes, Why are there so few?

Recently, at least, I have drastically increased the number of bots running. Normally, I only do this for a short period of time and I try to find a time when there are few or no humans playing. This is basically to speed up the beta-testing/game balance tuning after the addition of so many new ship classes. With 50 ship classes available, there are 2,500 possible combinations of 1v1 combat.. If I were to spend 10 minutes testing/evaluating each scenario for each class, that would be 25,000 minutes of testing or roughly 417 hours.. I can realistically only give about 5 hours a week to this game in a typical week (job, family, blah blah, etc). So that’s 83 weeks- just over a year and a half, if it’s the only thing I do.

There are two factors I can set to control the number of bots that are running. That is he maximum number of bots that will run at any given time, and the amount of time between spawning each bot. If, for example, I set the bot max to 6 bots, and the spawn rate to 1 second between spawns, There will be an almost static 6 bots running at all times. However, I like to have a more natural feel to the game, so I normally set the maximum number of bots relatively high, about 30 or so, and the respawn rate to about 300 seconds, which is pretty slow. The result I have seen, is a fluctuating number of bots, normally between 8 and 15 on at any time. This is of course due to the bots killing each other off faster than they can spawn to 15, but at the same time, spawning in less time than it would take to kill themsels down to less than 8 ships. There are exceptions though. Occasionally, I’ve seen as many as 20 and as few as 4 with the 30/300 max/spawn ratio.

Can the bots be exploited?

Frankly, yes. There are programming quirks that can, under some circumstances, make it easier for a human player to rack up kills/gold/dmggvn etc against bots. To some extent, this is totally unavoidable. Again, because of time constraints for play-testing and because of the leaky old boat syndrome, as soon as I program a change to correct an easy-kill condition, another seems to open up as a result of the change. It’ll take a ridiculous amount of time to plug all of the “holes”, and at the end of the day, if the bots were perfect, they wouldn’t be fun to fight against, and they might even drive players away by being so nasty.

Why not just turn the bots off?

Well, because there really aren’t enough players to justify doing so. Scrolling back through the connection logs, I’ve seen periods of as long as 12 hours without a single human login. I’ve also looked at the amount of time spent during sessions by individual players with no other humans online, and I’ve recently seen players spending an hour or more fighting bots. I imagine that if there were nothing to do besides killing/towing the six observer devices, and flying around, a single player online might only spend about 10 minutes or so, and have even less of a chance of running into a real human. So according to math and sociology, there has to be bots. At least for now. If the player base picks up, there will be a scale-back of the bots, and if there’re enough regular players, I may turn the bots off completely.

 

 

 

Feel free to comment

-obit

Category : archivegame updatesother newsUncategorizedweb updates

Tags :