Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8] 9 10 ... 31

Author Topic: Proceedurally Generated RTS  (Read 57058 times)

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Proceedurally Generated RTS
« Reply #105 on: January 13, 2011, 08:42:11 pm »

What would be neat is to implement this system in various ways. One race has the random hodgepodge of units built from junk, one has an evolutionary system where successful units 'breed', etc
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #106 on: January 13, 2011, 09:37:28 pm »

"X ammo is good against Y armour"...was what I thought you were avoiding, but with randomized stats, it could be plausibly carried off.

Like I said, I want to avoid it, but at the same time, I want to see what happens if I add it.

The problem (with X vs. Y --> more Armor Piercing) is that against ships with no armor value, bullet type and armor type are meaningless.

Unless you make armor always non-zero.  But that causes other problems in the algorithm (how do you alter ships that currently have no AP to combat the new higher armors, do you give them more damage, and how much?)

Anyway, I'm not going to play with new mechanics such as that until I have a triangle finder I'm happy with.

(As a side note, I found a way to encode a "DNA sequence" that should work)
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #107 on: January 14, 2011, 06:00:43 am »

Quite, but first one has to insure that every unit can be countered by an equal number of at least one other unit.

Technically you only have to find a balance where every unit can be counted by an equal cost of another unit, cost measured as a combination of whatever resources exist (including production time). Currently you assume one point in one randomiser has the same value as one point in another which gives the total points are your cost and so units all cost the same however that does not need to be the case. Also it's possible the assumption on totals matching is not a good one but I can't think of a better option with the current design.

It might be worth 'saving' setups that get win streaks over a certain size and then each time you get a new candidate for a win streak to play it against a few of the old ones. That way you will avoid the endless circle generation where a beats b and then c gets generated and beats b and then a pops up again and you repeat.

The other possible option is, has been mentioned, a more cycle based ga and not using two sides, but I'm not sure if that will get you the results you want. What it will do is generate a design which is best at surviving against a large variety.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #108 on: January 14, 2011, 09:20:24 am »

Quite, but first one has to insure that every unit can be countered by an equal number of at least one other unit.

Technically you only have to find a balance where every unit can be counted by an equal cost of another unit, cost measured as a combination of whatever resources exist (including production time).

Well, ostensibly, yes.

Quote
Currently you assume one point in one randomiser has the same value as one point in another which gives the total points are your cost and so units all cost the same however that does not need to be the case. Also it's possible the assumption on totals matching is not a good one but I can't think of a better option with the current design.

Currently its as close as I can come to insuring that units are at least near to the same "resource" cost without trying to figure out what the resource costs are (as there are no resources or even an economy design yet).

Quote
It might be worth 'saving' setups that get win streaks over a certain size and then each time you get a new candidate for a win streak to play it against a few of the old ones. That way you will avoid the endless circle generation where a beats b and then c gets generated and beats b and then a pops up again and you repeat.

I've gotten pretty close with my genetic algorithms thing, I just made a fatal flaw in the encoding/decoding process such that each generation had successively lower stats (by which I mean the ones directly controlled by the RNGs) as the numbers that went in weren't the numbers that would come out.  Whoops.  Now I need to look up how to do crossovers on chromosomes of different length.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #109 on: January 14, 2011, 11:46:19 pm »

--er --ing Done.

Check it out.  Results in under 60 seconds, typically under 45.  One of my timed tests ran to 35 seconds.

Next I have to work in some buttons to run simulations again on each pair of the final triangle to actually insure that they beat each other.

I love shortcuts.  Test 12 different units against the same "top" unit at once and forgo 12 drawn out conflicts?  YES PLEASE.

Something appears to be broken.  Hold on while technical support fixes the issue.

(G*D D*MN YOU FLASH.  Why does the development player differ from the web player?  Seriously there are FOUR VERSIONS)

Issue resolved by not renaming the file.  Not shitting you, the link above and this one are the same file.
« Last Edit: January 15, 2011, 12:08:13 am by Draco18s »
Logged

Nivim

  • Bay Watcher
  • Has the asylum forgotten? Are they still the same?
    • View Profile
Re: Proceedurally Generated RTS
« Reply #110 on: January 15, 2011, 04:00:37 pm »

 They're in lines now, and the result is quite a bit more obvious...although, it also seems more random; does the cutoff account for remaining hitpoints in the majority winners and the chance the losing party could still pull a win from that random chance?

 So, when do you plan on trying to change from a triangle balance to a crossed box balance?

« Last Edit: January 15, 2011, 04:12:24 pm by Nivm »
Logged
Imagine a cool peice of sky-blue and milk-white marble about 3cm by 2cm and by 0.5cm, containing a tiny 2mm malacolite crystal. Now imagine the miles of metamorphic rock it's embedded in that no pick or chisel will ever touch. Then, imagine that those miles will melt back into their mantle long before any telescope even refracts an image of their planet. The watchers will be so excited to have that image too.

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #111 on: January 15, 2011, 06:44:11 pm »

I noticed some rather crippling bugs this morning (such as sorting the array backwards and "breeding" the weakest units. :x )

Still working on having things work right.  I felt so good last night because it seemed like it was working so well!
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Proceedurally Generated RTS
« Reply #112 on: January 15, 2011, 06:48:43 pm »

Must be a rather robust function if you can have parts of it backwards and it still works.


Anyway, what I've been thinking is that the current graphical display is pretty, but not too useful. Especially for th early rounds, it would be a time gain to just work with numbers left alive and run it at max fps.
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Proceedurally Generated RTS
« Reply #113 on: January 15, 2011, 08:08:59 pm »

Yea, thats one of the advantages of evolutionary algorithms :p

They can work if you put the function backwards. or just gets the entire program from random.org. Or never build your computer at all just put a bunch of chemicals in a big pile.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #114 on: January 15, 2011, 08:38:28 pm »

Must be a rather robust function if you can have parts of it backwards and it still works.

Basically what it meant was that in order for a unit to be considered "good enough" the weakest one had to be good enough.  No idea why it caused a resolution so quickly though.

In any event I think I'm going to abandon the genetic thing.  I learned a lot and this doesn't seem to be the right solution, as its not accurate enough or fast enough for my needs.

Quote
Anyway, what I've been thinking is that the current graphical display is pretty, but not too useful. Especially for th early rounds, it would be a time gain to just work with numbers left alive and run it at max fps.

Its already running on a timer event (ever 5 milliseconds*) and you just get visual updates every 1/30th of a second.

*Every 1 ms is a little faster, but it makes it hard to see what's going on so that I can observe problems.

*Passive aggressive B.S.*

Thank you for your unhelpful comments, once again.
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #115 on: January 15, 2011, 09:22:34 pm »

Yea, thats one of the advantages of evolutionary algorithms :p

SVMs tend to work better than straight GAs though.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #116 on: January 15, 2011, 10:08:06 pm »

A what?
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #117 on: January 15, 2011, 10:39:30 pm »

Scaler vector machines, basically they can do what a ga does but more efficiently towards the local optima. We use them in sort search spaces cleanly a lot.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Draco18s

  • Bay Watcher
    • View Profile
Re: Proceedurally Generated RTS
« Reply #118 on: January 15, 2011, 10:53:00 pm »

You think you could adapt one to the objects I already have?  I had to change a fair amount for the GA stuff I didn't like; ended up with two pairs of class objects to do almost the same thing, and couldn't easily convert between them, although I could, plus several other functions to handle the "mating" and combat resolution.  It ended up being quite a mess.

I'm not sure what a SVM entails.
Logged

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: Proceedurally Generated RTS
« Reply #119 on: January 16, 2011, 01:12:39 am »

Had a similar logic issue in my tic-tac-toe GA.  "Player 1" and "Player 2" were set arbitrarily, but the functions that chose the moves always assumed that the AI called was "Player 1."  It still worked fine, and it was a few days before it even occurred to me.

I'd also love to here more about these scalar-vector machines.  I'm an engineering student, so I can see where they would be very useful.
Logged
EMPATHY - being able to feel other peoples' stuff.
Pages: 1 ... 6 7 [8] 9 10 ... 31