Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A.I

#1
Greetings!

I'm a master degree student in mathematics and I've been working on Artificial Intelligence for the last couple of months. I'll be doing my master degree thesis on this matter.

One of my main objective is applied to video games bots. I want to make their behaviors feel more human-like. I'm mainly working on a algorithm to gives A.I the ability to estimate to position of his opponent a human-like way be using his general game knowledge and some short-term memory of his opponent behaviors. Since I'm no programmer, I planned to use open source game to test my new A.I., and I tough Xonotic might be the thing I need. Of course, if things goes according to plan, these new A.I would be strong opponent for good FPS player, instead of the typical dumb bot you see in most FPS. This would be beneficial for FPS gamer granting them more fun playing against A.I .

I was wondering if someone would be kind enough to help me finding where are the A.I mechanics inside the source code.

Any help would be much appriciated.
Reply

#2
Heya! I've never had a look at the AI code personally, so I don't think I can be of much help. What I can tell you is that we don't have many active devs working on the AI these days... Mario left very recently to focus on real life stuff, and I haven't seen Mand1nga in a looong time. That makes relevant devs (or really any dev at all currently) kind of hard to reach.

Anyway, I can tell you this much: our game logic is coded in QuakeC (also called QC), very much like Quake 1. This code interfaces with the engine, which is written in C. As far as I can tell, this means you'll have to use QC for the bots.

I suppose it's best that you set up a standard build environment by downloading the sources from the git repository. Hopefully you have enough bandwidth and disk space to spare. This page might be outdated but the ideas still apply: repository access.

Most of the bot code can be found in the aptly named "bot" directory, within xonotic-data.pk3dir/qcsrc/server.

Some select people on our IRC channels might be able to help you if you have questions. We have a development-focused channel, #xonotic on irc.freenode.net, and a community-focused channel, #xonotic on irc.quakenet.org. If you're not used to IRC, one golden rule to remember is to be patient Wink
Reply

#3
Nice if the bots got some descent AI you'd get high fives from the guys and the girls would love you.
[MoFo] Servers - North America - Hosted in Montreal Canada - Admin DeadDred [MoFo]
Reply

#4
Given your background in mathematics, you presumably have a somewhat "theoretical" idea of AI - which actually is the true form of AI. The way our bots work does not count as AI to you, and it generally isn't that much more than event based logic on what to do when the bot sees an item plus some logic on how to move around.

True AI in the mathematical sense would be awesome to have, but also a huge undertaking to implement. As MrBougo mentioned our current AI code is in QuakeC - which is a gamecode language that hardly has the ability to do complex math. This is totally unsuitable for this, and essentially you would have to implement this directly into the engine (while probably first linking it to some math library for optimized matrix multiplication and such).

As much as I'd love to have this, as a non-programmer I simply can't recommend you to try and tackle this problem. Besides the AI knowledge it will really take a lot of programming skills to get this working. Please do notice that I am making a fair amount of assumptions here, so please do correct me if I am wrong.

Here's another idea though (more suitable for your thesis, less interesting to us):

Start using the drawn frames as input matrices for your AI, and use a supervised learning algorithm to basically start to predict the ideal keypresses or mouse movements based on the data you extract from the image that is drawn by the game.
Before posting a reply, please read about the bikeshed.
Reply

#5
The relevant code is in xonotic/data/xonotic-data.pk3dir/qcsrc/server/bot

Its basically a FSM with a few kilometers of red tape around. I would not recommend using it as a base for testing some idea simply because they are somewhat unpredictable, in a bad way, as is and there is more or less no one left who has a good grip on this part of the codebase.

Now, while what merlijn say about QuakeC's limitations as a programming language is very true, its also quite nice for rapid prototyping (once you get over its awkwardness). The main issue you will face, if you decide to try and use QC, is related to data storage and retrieval. QC does not have the ability to natively handle large data sets. This, of course, makes any sort of more advance AI an... interesting ; ) challenge to program in it.

Anyway, the thing i wanted to say is: you do NOT need to mess with the mysterious bot code to test your idea/s. You would do better to implement them on a new entity that does only what's needed. Then, if successful, it can be incorporated in the actual bot code.

If you need help with the qc related parts (for the "prototype"), i volunteer for that, as long as its not a huge project.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-