News – All

Bots Explained

Written by  on October 14, 2012

[edit Nov 2022: some of the information on this page might be out of date]

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

clp, 1965-2012

Written by  on August 13, 2012

PETERSON, Charles L. ‘Chuck’ Passed away on May 27, 2012 in San Francisco, CA. He was born April 30, 1965 in Sacramento, CA. Charles graduated from Del Campo High School in Fair Oaks, was an Eagle Scout and graduated UC Santa Cruz in 1987 in Computer Sciences. Charles is survived by his parents, Al and Mary Peterson; brothers, Bruce (Deanna), William, Jeff (Kathy); as well as nephews, Alex and Jeffrey and nieces, Samantha, Tiffany and Jacquie. He also leaves several aunts, uncles and many cousins. A memorial service will be held on Saturday, June 23 2012 at 1:00pm at Santa Cruz Memorial Gardens, 1927 Ocean Street, Santa Cruz, CA 95606.

Published in The Sacramento Bee on June 17, 2012

Game Update (2) 2012

Written by  on July 25, 2012

Improved bot logic:

-Bots will ram enemy ships under certain conditions.

-increased overall bot skill level from 5 to 1. (Can be set at 1-5 with 1 being the most skilled)

-Bots overwarp more effectively and more appropriately now.

-Bots now have a much higher chance of landing a mine in combat. They also mine and wide-phaser cloaked ships more accurately and with more phaser power. (previously they only fired 25 power but now they fire a full burst)

-ESI-equipped bots are now less likely to accidentally phaser a starbase/planet.

-Bots will break peace if a juicy target presents itself. They are also more likely to vulture a weakened/injured ship than a full power one.

-When outnumbered or getting defeated, a bot will attempt to flee sooner than previously. Also factors in situational awareness and runs away from potential teams/vultures before fighting if possible.

Game Update (1) 2012

Written by  on July 18, 2012

The game server is now 100% operational. (Including the high score list!) Things are pretty much the way they are going to be for a while.

At a glance, the game looks and plays nearly identically to the 90’s mtrek server. Most of the differences are improvements incorporated into the jtrek engine.

Here’s a basic breakdown of the changes you’ll find on this server:

Creating a ship-

You’ll be asked to enter your player name along with your ship name. The player name is used to link all of your ships into one fleet. When exiting the game, you’ll find that all of your saved ships using that player name, are listed on the third page of high scores. It will only display your top 20 ships, sorted by gold. If you’re planning to manage a fleet of more than 20 ship, I’d recommend adding another player name.

You may only choose from the 14 “standard” mtrek ship classes. (II-A, EXCEL, LARSON, DY-600, RBOP, KEV-12, KPB-13, BR-5, BR-1000, CL-13, CV-97, CDA-180, CDA-120) However, any of these may be traded in for additional classes not previously available in mtrek. See the player’s guide and previous Game Server Updates for details.

Miscellaneous devices

Seeker probes and lithium mines load and regenerate in your ship’s inventory the same way buoys do. These aren’t new for jtrek, but they were never part of the 90’s mtrek, so they’re probably worth mentioning.

Delta Quadrant

Again, not new to jtrek, but new to mtrek. You can get there via the spatial anomaly in alpha (object W). Currently, there’s not much to do there aside from looking at assimilated planets and upgrading to an AVG-IX.

I think it was originally meant to be a Borg-infested quad to add a little depth to the solo “player vs bot” play. There’s a lot of distance to cover, getting to the anomaly and the planets are pretty far apart. There’s also nowhere to save off in delta.

Delta will stay on the back burner for a while, but if I ever run out of things to do, I’ll play around with it some and maybe even get it finished up.

Server-side bots

Unlike mtrek of old, this server incorporates AI robot ships that fly around, attack players, attack each other, and generally, give players something to do.

Bots vary in skill level and ship class. Currently, they can be found flying EXCELs, LARSONs, DY-600s, KPB-13s, BR-1000s, CDA-180s, and CDA-120s.

The AI isn’t very good for cloaking ship classes and flys them as if there were no cloak at all. I’m not sure if I could improve upon it any, but cloakers are pretty useless without cloak, so for now, the above (non-cloaking) classes will be the only ones you see.

Finally…

Now that the game server is pretty much sorted out, I can spend some time on the website. Writing documentation is the bane of my existence, but it is a necessary evil.

I know fully well, how frustrating it can be, especially for a new player, when the docs are inaccurate, incomplete, poorly written, or in this case, a combination of all three. I assure you, I will do my best to expand upon them in comprehensive detail, and one day, perhaps, finish them.

-obit

Welcome to mtrek.com!

Written by  on June 23, 2012

I’m excited to say that the first (and hopefully the most difficult) hurdle has been cleared. We now have a running instance of the game on this server and a homepage to get new and old players alike, pointed in the right direction.

There’s still a long way to go..

  • the game: The high score list does not properly sort ships by gold. I am working to get the issue resolved, but it may be a while. It will require a bit of fiddling around in the guts of the java code.
  • the website: I have yet to add any content with real substance. I have made the site pretty though.. Hopefully it isn’t so pretty that players spend all of their time surfing here instead of playing the game. :/ I also worked out a logical site map to keep me organised as I plug-in useful pieces of info.