Graduate project

Graduate project

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Arminea
Posts: 5
Joined: 28 May 2015, 09:55

Graduate project

Post by Arminea »

Hi guys,
my name is Tereza. I'm a newcomer :) I study AI at university and I would like to specialize in game AI. In these days (until 24 june) I have to choose a topic of my future graduate project and I'm very interested in RTS games. So I thought that I could develop some AI scripts (in Java or C++) for Spring engine. But probles came out.

I know nothing about RTS game strategies yet, but I have whole year to learn it. My question is if I will be able to learn how to develop for Spring over summer break. How hard is it? Do I need to know how to develop simple games in Spring or it is possible to program without this knowledge?

I would like to try make multi agent system and implement A* algorithm :) Can I choose any game from Games section or is someone better for my goals?

Thanks for answering :) and sorry for my english, I'm not a native speaker
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Graduate project

Post by Anarchid »

Picking what game to optimize for basically runs down to what parts of the AI you expect to have most fun coding.

Does the game have an extensive tech tree and sophisticated economy system, while having bland units? You'll do awesome with decent economy planner and fight order into enemy base.

Are the units varied but economy simple? You'll need to invest more in actual tactics than into economy to even survive.

---

It should be definitely possible to learn how to make a Spring AI in less than three months. I think my own AI project ran for a little more than a month in total.
Arminea
Posts: 5
Joined: 28 May 2015, 09:55

Re: Graduate project

Post by Arminea »

Wow, that was really fast answer :) I'm reading about Kernel Panic game now. It seems that this is a game without economic stuff. So I could more focus on artificial agents and pathfinding, right? :)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Graduate project

Post by gajop »

Arminea wrote:Hi guys,
my name is Tereza. I'm a newcomer :) I study AI at university and I would like to specialize in game AI. In these days (until 24 june) I have to choose a topic of my future graduate project and I'm very interested in RTS games. So I thought that I could develop some AI scripts (in Java or C++) for Spring engine. But probles came out.
Welcome! I joined the Spring project by making AIs as well. It's fun and the current AIs are still not great so it should be pretty easy to create something interesting and even compete with other people.
Arminea wrote: I know nothing about RTS game strategies yet, but I have whole year to learn it. My question is if I will be able to learn how to develop for Spring over summer break. How hard is it?
"Developing for Spring" most often implies creating games. This is probably not something you want, if your plan is to focus on AIs exclusively, but even that should be doable to a certain extent during the summer break.
Arminea wrote: Do I need to know how to develop simple games in Spring or it is possible to program without this knowledge?
You don't need to know anything about that, and I advise you pick a popular Spring and try to make AIs for it.
In addition, it might be helpful to restrict yourself to only specific gameplay mechanisms by using just a few unit types (Spring games tend to have a lot of different units and situations which make writing AIs hard if you want to cover everything.)
For example, in the case of ZK I would suggest to just restrict yourself to cloaky bot factory with glaves and constructor for reclaiming and build power, solar for energy and metal extractors for metal. Only move to more complex situations when your AI performs exceedingly well at the simplest things (unless you plan to direct your research in general purpose RTS gaming via things like machine learning or something)
Arminea wrote: I would like to try make multi agent system and implement A* algorithm :)
A* is a common search algorithm that is used for many different things, but I assume you meant that you wanted to implement it for pathfinding?
I'd advise against it, as Spring already comes with its pathfinding implementations in C++ (the best being QTFPS + A* or something similar I think), which is pretty hard to understand and modify for a beginner.
You can of course use A* for different purposes, such as making the build plan, but my advice is to always start with the simplest solution and see how things perform, and only then look for more complex algorithms. A predefined initial build plan tends to perform pretty well and even beat most machine learning attempts sometimes.
You'll need to think a bit more about what you want to do in your master thesis though. Just implementing A* in a multi agent (game) system is an old and well solved problem.
Arminea wrote: Can I choose any game from Games section or is someone better for my goals?
Choose ZK or BA. Both games have a lot of human players and are therefor well tested and balanced. They also contain a lot of AIs, with the ZK side being more popular for AI development recently.
Kernel Panic might also be an option seeing as it's rather simple to play I think, but I don't know much about it.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Graduate project

Post by PicassoCT »

The most trouble - you will run into, is teaching your AI about the LUA-gadgets and side-effects.
Some games use lua extensively, and its rather tough for a AI to find out why that particular unit got hurt.

TL,DR; Code is breaking the ability for a AI to understand all the games. Also +1 to gajops advice.
Arminea
Posts: 5
Joined: 28 May 2015, 09:55

Re: Graduate project

Post by Arminea »

Ok, let's say that I will choose only ZK like my target game :) And yes, I meant to use A* for pathfinding.

This will be probably a stupid question, but what other goal (except a pathfinding and creating multi agent system) could I possibly have?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Graduate project

Post by Silentwings »

Playing the game well, choosing the right strategies, etc.

Afaics it would be a bad idea to implement any pathing stuff yourself. Then engine can already do all that for you.

I would actually recommend not picking BA/ZK or any similar game, because in both cases the game mechanics are complicated enough that I don't think you could write a good AI without being a good player too. Maybe look at something like Kernel Panic?
Arminea
Posts: 5
Joined: 28 May 2015, 09:55

Re: Graduate project

Post by Arminea »

Of course :) I know that knowing the strategies for chosen game is an essential requirement :) I choose Spring engine because I love strategies. I mostly play medival of fantasy games, like AoE or Battla for Middle Earth, but I think that I can adapt to any strategie.

The advantage of Kernel Panic is that you don't need to take care about economy, it' simpler to understand the principles, right? :)
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Graduate project

Post by Anarchid »

This will be probably a stupid question, but what other goal (except a pathfinding and creating multi agent system) could I possibly have?
Showing the puny humans who's boss!
Kernel Panic sounds like a very good idea. The only (possible) downside i see to it is low playerbase -> no competition (neither human targets nor too many competing AIs).
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

Re: Graduate project

Post by PepeAmpere »

Arminea wrote:This will be probably a stupid question, but what other goal (except a pathfinding and creating multi agent system) could I possibly have?
Depends on complexity of your task.
  • For one university subject completion some A* appliation can be enough
  • For Bachelor thesis there can be some simple system implementation or analysis of some of its aspect (performance, universality, learning ability, development userfriendly-ness if its not self-learning system, and many others...)
  • For Master thesis it can be much more (more complex or more specific in given area of investigation
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Graduate project

Post by Silentwings »

Arminea wrote:The advantage of Kernel Panic is...
I'm afraid I can't tell you any more detail because I don't know details - but yes, the advantage of KP for this is that its a simple (and good) game.
pitfalls, projects, risks, blah blah blah...
They exist. Welcome to life, like it or lump it. Your best bet for finding out how much you're biting off here is too talk (by pm or join #moddev, in lobbyserver, I suggest) to recent makers of AIs - gajop and Anarchid come to mind, I'm sure there are others too.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Graduate project

Post by PicassoCT »

There are two graduate projects - the ones attempting something new and the ones writting all the stuff allready existing up into a sumary.
If you do something new there is always the chance of failure.
But also of glory.
And of becoming really good, cause you do something you like.
We need a ranked tournament lists of AI again, a monthly reason to return and defend your mindchild.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Graduate project

Post by Anarchid »

I'd be pretty interested in a ZK AI tourney.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Graduate project

Post by abma »

My question is if I will be able to learn how to develop for Spring over summer break. How hard is it?
depends on your programming knowledge and if you already used cmake/g++/git. If so, then you shouldn't have huge problems as there already exists several working ais which can be used as reference.

when using c++ you should use Shard as example which made it possible to write a native ai in lua, as it uses the up-to date c++ AI Interface.

I'm not sure what you are planning, but a maybe imporant note is, that the ai-interface isn't threadsafe.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Graduate project

Post by enetheru »

Arminea
Posts: 5
Joined: 28 May 2015, 09:55

Re: Graduate project

Post by Arminea »

Holy sh*t, that Ph.D thesis seems really interesting. I will totally read it :) Btw. I wanted to learn c++ long time ago. Until now I've made programs in several languages, so it shoudn't be a problem to learn another.

Thanks to all of you for help :) I thought about minor tasks of my thesis. For example

1) examine Spring engine (because this topic will be unique in my class, some research will be necessary)
2) study different rts strategies
3) impement several of them (language and game are optional)

That's just a rough draft.
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Graduate project

Post by raaar »

A basic way of examining the engine would be playing spring games.
Orfelius
Posts: 103
Joined: 17 Nov 2014, 20:57

Re: Graduate project

Post by Orfelius »

Kernel Panic:
+ simple in design
+ simple in code
- doesn't work with latest engine
- has literally 0 players playing it

Balanced Annihilation

+ has a decent playerbase
+ uses the latest stable version of the engine
+/- relatively balanced (balance doesn't change) and rather simply designed
+/- a bit complex in code

Zero-K

+ has a decent playerbase
+ has multiple of AI programmers trying to make their AIs for it right now
-/+ balance tends to shift as it is in active development compared to the other 2 games
- complex in code
- doesn't use the stable version of the engine (shouldn't be a big deal since it will prolly hit stable when 99. finally comes along)


Please don't take my world at code stuff since I am not a developer and these opinions are just from what I heard from the actual spring devs.
It is also fair to say that if you decide to make your AI for Zero-K people will be actually grateful for your work since there is quite a number of players that play solely against AIs. Where in compared to BA there is barely anybody that does it there.

Oh and regarding of what the AI needs to be like: it should not cheat. Seriously cheating AIs with like resource bonuses or map hacks are just frustrating to play against. Its because the players simply feels like he is being scammed.

Hope that this helps :)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Graduate project

Post by gajop »

Orfelius wrote:Oh and regarding of what the AI needs to be like: it should not cheat. Seriously cheating AIs with like resource bonuses or map hacks are just frustrating to play against. Its because the players simply feels like he is being scammed.
It's actually advisable to start with AIs that have full map LOS ("map hacking"). This is because it requires substantially different (and more complex) code to make AIs that work in partially observable environments.
Resource bonuses should be all-out avoided unless as perhaps a difficulty setting.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Graduate project

Post by AF »

Shard was my final year project of my degree, so yes you can do this.

I would note that games like ZK etc have lua gadgets, and native AI <-> lua gadget communication is not documented very well, and would require cooperation with a gadget on the game side of the divide to pass along information to the AI. For games like ZK, a lua gadget AI may be easier, and will have greater flexibility, but it will mean you can't rely on C++

But for a game like BA, or Evo RTS, you could make great strides.

Alternatively, starcraft brood war is super cheap online and has an active developer community. It should do well for your purposes, and there's a lot of youtube footage of gameplay you can reference.

For spring gameplay footage, shadowfury's youtube channel has a fair amount of ZK gameplay
Post Reply

Return to “AI”