Some general questions regarding EvoRTS (Thesis)

Some general questions regarding EvoRTS (Thesis)

Old Evo threads before move to own site

Moderators: Moderators, Content Developer

Locked
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Some general questions regarding EvoRTS (Thesis)

Post by Senth »

Hi,

I'll present myself and our thesis to get some background on who I am and why I'm asking these question.

My name is Matteus Magnusson and I'm studying my 3rd at BTH in Sweden as a Game programmer. For about half a year ago we had an assignment where we were supposed to create a simple AI for EvolutionRTS. It was an old version, but nevertheless it was sometime around that time I decided to do a thesis about an AI for EvolutionRTS, or rather any RTS but since we had used Spring and EvolutionRTS before it was an easy choice. My friend later joined me in the thesis (before we started). The thesis current title is: Adaptive Goal Oriented Action Planning for RTS Games

I've been looking around a little in this forum and the repository to gather new information. So now I have some questions regarding EvoRTS and instead of us trying to figure out everything I thought I'd be easier to ask you guys.
  • In the old version there were only units definitions that started on e (e.g. eengineer), but now there's some that start on t (e.g. tengineer) and those that doesn't start at anything (e.g. barricade). So what's the difference? If I'm right the units that are used are those that start on t?
  • I saw that you've implemented a new armor/weapon system. I guess this isn't available in v1.0?
  • In the new armor/weapon system, is it possible to get the armor type from Spring? I.e. does getArmorType() in UnitDef return the correct armor type for all units?
  • Is it possible to get the weapon type from Spring in one way or another? I couldn't find any getWeaponType() in WeaponDefs, but if you only have four different WeaponDefs I guess they work, however I'm not sure that you do.
Anyway the least thing we want to do is hardcode the information.


If there's something I'm missing or if you can think of a better solution please state them. Neither I nor my friend is an expert on the Spring Engine so there might be something you think is obvious that we can't see :)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Some general questions regarding EvoRTS (Thesis)

Post by Forboding Angel »

Well first of all, I have to say that I'm flattered :-)

I suppose some background is in order... Basically, Evolution has (true to it's name... unfortunately lol) switched directions completely a total of three times. The first was because my original plans for the game just didn't work at all, the second was because the models and textures that I was using were ugly as sin and Kaiser join the team.

Thankfully, we now have the tools and ability to do what we need to do, and as a result, for the first time (in my mind) Evolution finally has solid ground to stand upon.

That said, the 1.0-1.09 versions are over a year old at this point. We recently got Evolution tied up with SpringDownloader and Evolution's svn repository. I've been breaking my back working on polish and trying to get everything shipshape, and kaiser is even working on a second faction now that appears to be roughly 66% done.

Getting into Specifics: The only faction that exists presently are the "Outer Colonies" (previously "Explorers). Basically it was necessary to re-write the storyline to have it fall in line with all the advances we've made within the past year.

If you take a look at the current repository (http://www.svn.evolutionrts.info - Tracking tool (redmine) Available via http://www.redmine.evolutionrts.info), you will see a lot more consistency between units (ignore armflash, that unit is jsut a demonstration and is not used in evolution). Moreover, they have been sorted into directories so that now it's easy to find what you're looking for.

The reason so many units in previous versions didn't have E or T in front of them was because various units were shared between each side (basically, according to the story, the two sides were the same people, only estranged by 20 years, so it made sense that various buildings and economy structures wouldn't have changed noticeably in that time). This is no longer the case, as there is only a single faction anymore, and no longer are there tons of units sitting around that do nothing/have no function in the game itself.

I do apologize, looking at those old archives would be enough to drive anyone crosseyed trying to figure out what is going on.

I highly recommend that you grab the latest testing version (you will need to use spring downloader to get it), because it makes so much more sense in terms of understanding structure, and what everything does.

The new armorsystem is available in the latest testing builds via springdownloader and has proven to be a godsend in terms of game balance, however, don't let the numbers fool you. The counters themselves are not particularly "hard", but if you have a problem with X unit, units Y and Z will handle the problem better than units A and B.

As far as grabbing the armortype and the damage type, you can use:
unitDef.customParams.armortype
and
weaponDef.customParams.damagetype

Hopefully the above info has been at least marginally helpful, if there is anything that I can do to help make your lives easier then just let me know.

Additionally, I should mention that a teching system was also implemented (called "Power"). Basically, certain units require x amount of this tech to be built or to fire, Solars provide +1 power (power is not energy!), and fusions provide +10 power. Both solars and fusions also provide +1 energy and +10 energy respectively.

Units no longer cost energy to be built. Instead units only cost metal, but spend energy to fire (formula is weapondamage / 10 = energy cost to fire).

It's very important to note that AI teams are not bound by power requirements but they are bound to energy needed to fire their weapons.

At any rate, I'll stop rambling, but like I said, if there is anything I can do to help out, just let me know :-)
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by KaiserJ »

woah, welcome, and cool!

how did you end up with evo specifically as a subject for your work? seems very obscure!

anyways best of luck to you, i'll help as much as i can (alas i am not a programmer, just an artist) and i look forward to seeing what you will come up with!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Some general questions regarding EvoRTS (Thesis)

Post by AF »

Perhaps by the end of your assignment you'll be able to best Shard ;p

If you need help feel free to prod us in the #evolution channel on the lobby
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by Senth »

Thanks for the replies :)

@Forboding Angel
Now everything seems much clearer :)

Hmm, Spring downloader. I guess it only exist in Windows? I have to try to wine it then, since I'm programming in Linux. However I've made the project simple to compile and run in both Linux and Windows because my colleague is using Windows.

@KaiserJ
Our teacher gave us an assignment where we were supposed to write a simple AI. Or it was two assignment, one which only was build x attacking units of that kind and scout with y units. Goto enemy spot with x-group.

The second assignment was more of tactical and the architecture had to be quite dynamic.

So that's really the story how I ended up with EvolutionRTS and Spring :)
I don't know how my teacher found out about Spring and EvolutionRTS but he would've that eventually since his area of expertise is RTS AI.

@Everyone
Thanks for helping us out. If we need any help we'll probably ask you more the coming days, now that we're designing the architecture, than later when we're implementing it.

Anyway the AI will be really simple, It would've been great to create a complete AI but we'd probably need 5 times the time we got now. However I might continue on this AI implementation in my Master thesis and maybe then It'll be "complete". :)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Some general questions regarding EvoRTS (Thesis)

Post by Forboding Angel »

These instructions are old, but I'm fairly sure they still apply:

Linux support:
* installation:
wget http://files.caspring.org/caupdater/Spr ... loader.exe
sudo aptitude install mono libmono-winforms2.0-cil
mono SpringDownloader.exe

Sounds like a really neat project :-) As I said, if there is anything I can do to help, just let me know!
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Re: Some general questions regarding EvoRTS (Thesis)

Post by det »

Under linux there are two programs that can download the evo test version. Mono + SpringDownloader as forb described, and also a command line tool that Tobi made. Assuming you are using Debian/Ubuntu, you can try this:

Code: Select all

sudo aptitude install python-dev python-setuptools
sudo easy_install rapid-spring
rapid pin evo:test
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by Senth »

Thanks. I'm using Gentoo but it wasn't hard to figure out the corresponding packages to the ones you described. I Tried with mono myself, but I gave up after a while and decided to test rapid. It was much simpler.

We've mostly been in programming in school since it's much easier to design the system when we can talk directly to each other and have access to a whiteboard :)


We have the general Task system done, and are now focusing on creating the system for prioritizing what units we should build. Only economic units and scouting units at this part.

The next step is to implement our "simulate battle" function which can simulate a battle and returns some useful information, e.g. how many units we or they had left, and what we need to build more.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Some general questions regarding EvoRTS (Thesis)

Post by zwzsg »

Reguarding armor system, here is a function I typed for R.P.S.'s automatic tip dispenser

Code: Select all

local function GetDamage(predator,prey)
	return WeaponDefs[UnitDefs[UnitDefNames[predator].id].weapons[1].weaponDef].damages[UnitDefs[UnitDefNames[prey].id].armorType]
end
  • It's in Lua, not in C. So your AI interface might be different.
  • It only consider the first weapon. But I hope you'll notice the 1 and how it can be changed to n.
  • It takes two unitnames as argument, exemple: GetDamage("rock","scissors")
  • It outputs the damage one shot of predator weapon deals to prey. You would have to take into account the rate of fire to get the damage per second.
  • I use GetDamage(predator,prey)/GetDamage(predator,"hand") where "hand" is standard unit with no special armor, to get the damage bonus instead of the absolute damage.
  • I over complicated it just for fun. I could have just used:
    WeaponDefs[UnitDefNames[predator].weapons[1].weaponDef].damages[UnitDefNames[prey].armorType]
    And by using unitDefID instead of unitName, it would be:
    WeaponDefs[UnitDefs[predatorDefID].weapons[1].weaponDef].damages[UnitDefs[preyDefID].armorType]


Edit:
Forboding Angel wrote:As far as grabbing the armortype and the damage type, you can use:
unitDef.customParams.armortype
and
weaponDef.customParams.damagetype
Wait, what, custom? Oh no, what I said is irrelevant then!
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by Senth »

The bot works :)
The bot (Al Ice) can easily beat RAI on larger maps, preferable where are more than 8 extraction points. However it gets beaten on those smaller maps since a tower strategy is good for those and this AI only builds tower if the enemy has 'some' mobile attacking units.

I can beat it :(
I can currently beat the bot using the build only tower strategy; the base is expanded with the help of tower. However you probably need to occupy a large amount of the extraction points so that the AI doesn't get too much resources. Since Al Ice can't handle atom bombs and other helping buildings like radar, radar-jammer, etc. (wasn't a part of the thesis) you can also win quite easily with defending a small area while building lots of fusion reactors and nuclear silos :P

Other stuff?
Anyway it would be fun to test it against Shard, but we can't manage to get it work. Same problem as another one has on his machine (posted this in the Shard thread).

Another thing is that our AI doesn't cheat. Thus it's harder to form some sort of strategy, or we don't form strategies at all only build the units that are best against the once we've seen. But that's also hard if the enemy got a tight defense.

Release
There isn't much time left until the thesis is done; about two weeks. When the work has passed we will put up the source code and the thesis. Everything is documented in doxygen--and I actually mean everything, even all the variables.

The future
We might continue the work, depending if we have time for it in the summer. As for me I'm starting a game company (mostly for some hobby-projects), and I also have some other non-game relative projects I want to complete.

Some of the things that would be nice to implement are:

Planner
One thing that I certainly want to implement is a planner, but that will take some awful amount of time to implement. This could be used with lua to support a set of user-generated tasks.

Terrain analysis
Terrain analysis would also be 'fun' to implement; i.e. the ability to flank a player.

Better and optimized enemy information
As of now it really doesn't know what the enemy has if it has built up a good defense. Enemy units are removed from a local map after 30s; because they can be destroyed and we don't get an event that it's being destroyed.

Lua support
Some support for changing, adding and/or disabling features of Al Ice. User generated tasks would've been nice to have.

And many many other things...

EDIT: Oh the main questing that I actually came here for. Is it ok to use the armor-system image that you've posted on www.evolutionrts.info?
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by KaiserJ »

<3

where might i acquire this AI?
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by Senth »

KaiserJ wrote:<3

where might i acquire this AI?
It will be released in the beginning of June, together with the source code. I'll post the address then ;)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Some general questions regarding EvoRTS (Thesis)

Post by Forboding Angel »

Oh for the love of god, I'm so sorry! I totally missed the part about the damage chart!

Here is the latest one. I had to nerf piercing damage a little bit.

Image
Damage Chart.png
(264.72 KiB) Downloaded 1 time
Senth
Posts: 6
Joined: 08 Apr 2010, 16:59

Re: Some general questions regarding EvoRTS (Thesis)

Post by Senth »

Ahh ok, thanks. I'll use that one in the thesis instead and be sure to add a note for which revision it is used in. I guess these are the values used in rev. 458?

Anyway, we just need to do some more tests and fix some smaller things in the thesis then we're done. However we really need to fix the 'attack task' if a group sees an enemy while moving to their destination they can get stuck and do nothing. This wasn't actually an issue for 'medium' maps like DeltaSiegeDry but for larger maps many units (about 100) will stand still and do nothing and thus it takes forever to win. :P

When that task is fixed I'll link two the site where you can find Al Ice ;)
Locked

Return to “Evolution RTS”