-
Code:
Behemoth,
I realise you ain’t gonna read this for ages, but my gibbering
here will help clear things up in my own mind…
I was thinking about AI. I think we should not just have a
generic AI which does everything, but instead create AI models
which fulfil different roles.
Below are what I’ve come up with and a brief overview of each…
Aggressive
Actively seeks out enemies and attacks them.
Passive
Fires only when fired upon.
Coward
Runs at the first sign of trouble.
Defence
Defends where it is, shooting at bad guys if they
come into range. Will pursue them to the boundary of the area
it is defending until they are destroyed or leave. Will then
return to roughly the centre.
Sniper
Shoots enemies within its range, attempts to move to
maximum range whenever possible to stay out of harms way.
Suicide
Runs up to the nearest enemy and explodes violently.
An AI range will need to be defined at some point which denotes
the area a unit will scan to perform its actions. The bigger this
number, the more processor power AI will take, but the more
effective it will be. I’m debating whether this should be set at
a global level or at a unit level. I think at a unit level ‘cos
then you can define defensive areas easily.
-
FYI: I picked this up on Sunday morning...
I like the idea (as previously discussed), and a local AI range is going to be simpler and less intensive to implement as well as more flexible. Of course there would be many more AIs than that.
eg
MINER
Standard RMV AI but will empty squares of their resources, and will not run when fired upon.
SPOTTER
Finds strategic position for spotting, surveillance and recon. Moves at the first sign of trouble, but will attempt to return to its spotting square as quickly as possible.
DEMOLITION
Similar to Aggressive, but will aim to destroy buildings.
DESTROY RMV
Aggressive, but aims to cripple economy.
Etc, etc...
-
Yup, that's the kind of stuff. Well, that's our unit AI approach decided.
We need to do a pen and paper evening some time soon. Any evening this week I'll be free after work for a couple of hours.
Monday's probably best for me. If I stay at work 'til about six then I can give you a lift back to yours and we can commandeer your study.
If we both do a little bit of work on it at work/college then we can just compare our handwritten notes, finalise what we have (and sort out a couple of weapons as well for balancing what we've got already).
Should wrap it up within an hour depending on what we get done at work/college.
-
Sorry pal, Monday's not good for me...
-
Instead of telling me what's not good for you, why don't you tell me what is....?
-
Ok, let me think long and hard about this...
hmmm...a tough one.
Bear with me, nearly there...
<sarcastic mock surprise>Any day but Monday perhaps...?</sarcastic mock surprise>
-
We can do most of this in here anyway... I'm probably not going to be doing much today. Half my team's away, so my Project ain't going to be Managed all that efficiently...
-
I'm going to set fire to you.
OK, we can get stuff done in here - I'm a little busy but I'll cope.
Also, I played SC with Joe last night. Me vs him and two computer players. It was a rout. They didn't stand a chance.
-
cool...he may eventually start learning stuff...oh well...Hope springs eternal...
-
Current list of AI models:
Agressive
Passive
Coward
Defense
Sniper
Scout
RMV
Demolition
Suicide
RMV killer
Spotter
Road Layer
Mine Layer
-
Does the Demolition model include road demolition, or is this another model?
-
Decoy:
Usually fast expensive mechs, does what it says on the tin. Draws fire away from strategically important buildings/units.
Viral:
Multiple mechs spread out quickly to cover as wide an area as possible around a particular location (main base). Then perhaps revert to other AI models...
-
Just been discussing it with a colleague and he came up with some:
Decoy ( :) )
Mine Clearer
Road Clearer
Ambush
Also I've worked out how the computer is going to assign AI models to the units. Use a random number with weighting system.
i.e. pick a number from 1 to 100. there's a 8/100 chance of being agressive, 5/100 chance of being defense etc. One a model is determined, the unit is then designed around the concept. Agressive (med guns, fairly fast), defense (big guns, slow), sniper (long range guns, battle chips).
I'll try and compile something shortly to summarise.
-
readjust the weighting determined on what AIs have already been distributed, enemy location, economic strength and any other relevant circumstances...
-
Please try to narrow it down.
Relevant circumstances is useless when trying to define AI.
How does economic strength, enemy location etc affect it? Maybe the weightings should differ slightly dependant on the faction's ideals. We've already defined these haven't we?
I haven't updated the map generator screen to reflect them. Crap.
I think I've got a busy night coming up....
-
The game is going to be fluid and constantly changing. We can't have the AI with a static program churning out the same mechs...
An economically strong faction might want to build some DESTROY RMV mechs to ensure it remains strong. A faction that is spending all its cash on big whopping mechs, but has to wait for them to build, might but his remaining units on viral / spotter AI, 1) to ensure that he doesn't succumb to sneak attacks and 2) to provide spotting assistance to the big long-range mechs once built.
Thats what I meant to ask. Is AI fixed, or can a units model be changed? eg, an aggressive mech thats taken a kicking may change to a coward mech to get the funk outta dere?
-
AI models should be able to be changed by the player. Not sure about the computer though.
The computer won't have to wait for mechs to be built, it will only design mechs when it has components to build one. Early on, the mechs are going to look pretty similar no matter what their AI as the no of availble components is going to be limited.
Here's what I've got so far...
AI’s
*Notes*
Area refers to the defines area which the computer scans in order to determine what actions to take.
Chassis selector chooses a chassis based on the average terrain type in the area it's probably going to be working in. A defensive mech will check the base, take the average terrain into account and choose a chassis accordingly (biased towards weight it can carry). An agressive mech will scan the area between our base and the enemies to determine its chassis type.
Aggressive:
Scans the area for enemy units. Moves towards the closest as follows; moves as close as poss, selects a target most likely to kill, fires all guns, reselects target - loop. If no enemy within range, heads towards nearest enemy base.
Use chassis selector algorithm to choose chassis. Add highest slot torso in inventory. Add best energy chip. Add best battle chip if avail. Add another if poss. Add most powerful shield in inventory. Add 10% of max chassis weight of best armour. If not enough armour, us next best. Loop. If no armour on mech after that, add armour which gives most points of health. Add reactor in inventory which gives best max power output. Ensure min 8kph. Add biggest gun possible, checks speed. If less than 8 removes gun and adds next one down. Check weight against max weight. If ammo based add 20% of weight of gun’s worth of ammo. If speed ok, go to next slot and add another gun. Repeat. If not all guns used, check if correct slot torso avail – if so use it.
One aggressive mech designed…
Passive:
? What use are these?
Coward:
? What use are these?
Defense:
Scans area for bad guys. If found, lumbers at half move over to closest enemy to centre, fires entire salvo. If not found remains stationary. When area is devoid of enemy moves at full speed back to centre.
Use chassis selector algorithm to choose chassis. Add highest slot torso in inventory. Add best sensor chip. Add best battle chip if avail. Add best energy chip. Add most powerful shield in inventory. Add 20% of max chassis weight of best armour. If not enough armour, us next best. Loop. If no armour on mech after that, add armour which gives most points of health. Add reactor in inventory which gives best max power output. Add biggest gun possible. If ammo based add 20% of weight of gun’s worth of ammo. Go to next slot and add another gun. Repeat. Check weight against max weight. If not all guns used, check if correct slot torso avail – if so use it.
-
Passive and coward are AI models, not mech specifications - that's why I was discussing variable AI models...
Coward and passive are manouvers, not ways-of-life. A "retreat!" and "fall-back by ranks to the APC" if you will.
-
a) What do you think of the methods of designing the mechs? Do they make sense
b) I'm not sure passive and coward are of any use. Mechs automatically return fire if they're shot at so for passive, just turn the AI off. Coward, I'm not convinced of. What possible use is this going to be? Look at when the computer controlled units in SC break off from combat and run away. They almost never make it. They're going to die, so they may as well spend their few seconds firing.
Instead of passive & coward, we combine then into offensive. They attack until they feel the odds are overwhelming or they're taking too much damage and then they RTB.
-
OK, but where do you draw the line?
-
Instead of just asking questions, maybe you should ask questions and then propose a solution?
Just a tip - might help you get on in life. Make you seem like and idea hamster. No sarcasm implied.
When it drops to less than 20% of its max armour?
-
What I'm implying is that a huma player is constantly evaluating subtle nuances in the play.
Say for example I'm attacking an enemies building with mech A. The ruckus draws attention to me, and enemy mechs B and C turn on me. I then have to decide
1) do I continue to attack the building and hopefully bring it down before I'm eliminated
2) do I attack B and/or C in an attempt to survive longer (although probably still lose because I'm outnumbered.
3) RTB
4) retreat a short distance and then attack a different target away from B and C
5) send in reinforcements in the form of D and E
6) run up and group-hug the building, B and C prior to a spectacular reactor meltdown
and these are simply the vague overviews.
Assuming I choose one of them, at what point do I stop and reevaluate issues?
These AI models are good, but we need to ensure that they are flexible enough to use. A unit given just ONE of these models will be severely limited to its choices in the above example - and thats a simple one.
Another example - slightly different one.
A bunch of Protoss Carriers is bearing down on you. The air is thick with a swarm of interceptors. What do you do? You back up a little and shoot at the carriers (the passive targets) not the intercepters (the aggressive targets). If you get down to 20% health and the carrier is nearly dead, you stand your ground and finish it off.
Sorry if im waffling here, but the wheel is turning...
-
I think we should assine a model at the outset and leave it at that for the computer players. The human players can either alter theirs on the fly or guide the units by hand.
What the human player hss in flexibility and skill, the computer player will counter with volume of units and efficiency. It's not going to forget to build a component or mech that turn. It's going to be churning stuff out at a rate of knots.
Similar to SC. The computer player lacks the skill we have but is much faster and more efficient in its construction of units.
We can put a selectable option on all units to destroy the mech if it gets to less than 10% health and there are enemies nearby...
-
So it'll be a bit like fighting a CPU Zerrg player? Ok.
I don't follow your last line though...You mean they can decide whether to run or fight?
-
My last line was the human player can select an option for each mech to explode messily if it falls below a certain health level and there is an enemy unit within the blast range.
i.e. if the mech is on its way out, blow up and make a mess.
PS - Sat 9th June. I'm off to Alton towers with Chiri and a load of other dykes. Fancy a day out?
-
cool - a day out with some hot lesbo action. we'll see...
What's the point of suicide explosive packs if a mech can self destruct anyway. Or does that determine the size of a bigger explosion?
The decision is more "Should I stay or should I go now...?"
Fight to the death or RTB...
-
Behemoth,
We've not got any way to create buildings and I'm looking for your thoughts on how we should do this. I was thinking of having them built in the same way as components (component viewer, added to build Q etc). Then the construction yard could just prepare it and out it pops. It think that's the best way, but it will unbalance the screens, (we have eight components, adding buildings to the screen will make nine). Boooo...
Your thoughts?
-
A separate building construction screen accessible from the same menu - perhaps a button at the bottom of the screen...I don't really know...
-
Project Overview
Intro movie
Instructions
Tutorial
Player select and map generation
Movement
Mining / harvesting
harvesting sounds required?
Research (Processor points)
Final Tech, Sentience - I've done a graphic now! its also going to be used as the game icon...
Industry (industry points)
(do mechs require industry points to be built from their constituent components?)
Combat
ranged combat
close combat (specify which weapons do what when...)
combat sounds
combat AI models.
Buldings
Moving buildings
> Static buildings
Building functionalities.
OMG! LIST OF ALL BUILDINGS REQUIRED!
Diplomacy
Waahh :( head hurts
Win / lose conditions
Ending movie(s) ?
-
anything else you can think of?
-
Looks pretty much comprehensive.
I was installing Stargate on loads of machines today, so I was sitting around thinking a lot. Are we going with this idea of making the help file a web page? Not a lot's been done on it so far so if we want to change our mind, now would be a good time.
Do you want me to carry on sending you bits of manual, 'cos that couple of page word document I sent you which took me ages to write didn't go anywhere... :p
When do you think you'll be able to tidy up the webpage and get it in the right format, so then it's just a case of plugging in paragraphs?
Response:
No mechs do not require ind points to be built from components.
I can't think of anything else at the moment - if I do, I'll post it.
Nice one on doing the icon so fast, when do I get it?
The spreadsheet we're making with the components on will help when making weapon damage tables etc.
We still need a pen and paper sesh to come up with some proper weapon stats. I'll be back from the gym at about 19:30 if you want to come 'round.
Don't think harvesting sounds are required, but we do need more speech... :(
-
-
Nice,
But it's for non-commercial use only.
-
And you didn't answer the questions I asked either.........
-
The manual isn't important for now. We can get onto that when everything is functional. for now the thread in games programming is sufficient...
-
Yep, you're right.
I'll still work on little manual bits when I get chance though. Do you want me to send them to you, or don't you care?
I got bog loads done last night including the construction of buildings!!! I finished it a one in the morning after I got in from the pub pissed as a fart. The last thing I remember is struggling like hell to get it to work, changing a value from x to x+1 and then it worked! Fantastic!
So, we need to define a list of buildings and weapons. Any thoughts for buildings?
-
Not in any order:
Command Centre
Construction Yard
Chemical Battery
Warehouse
Factory
NanoFactory
Processor node
Laboratory
Ion Battery
Power Plant *
Static defense *
Detector array *
Walls *+
Also, we currently have 'types' of buildings. I want to categorise things as merely buildings with different attributes. i.e. a processor node will have a positive benefit to processing power, everything else will be nil or negative. A warehouse will have a positive benefit to storage, everything else will be nil.
*We (sorry, I) also need to work on an auto building generator which creates a static defense building for each weapon in the component list, a detector array for each sensor chip, a wall for each armour type, and a power plant building for each reactor in stores.
+ (comment on this please) The walls are to be made of armour and can be moved around (basically useless building designed to absorb damage). A 'wall' is a building with 10 tons of the selected armour type. Because the 'wall' is a building, it can be moved around - providing a useful method of expanding the base perimeter. We can format the walls to look funky cool using a similar algorithm to what is used to draw the roads. You will need to produce some wall graphics.
-
Code:
Type BuildingStatsTemp:
Name as string
Standingcharge as integer
ProcessorDrain as integer
Costs as coststemp
IndPoints as integer
TechReq as byte
Viewrange as integer
Armour as integer
Weapon as integer
End Type
Any others?
-
+ I hate you...!
It's probably a good idea, but aren't ranged weapons going to be able to fire past buildings anyway? It's going to take a hell of a lot of production to make a base perimeter (remember how long it takes to build walls in AOE and they're built in place!)
I agree in principle with everything you've said here. We really need to thrash it out though. I like the idea of all buildings having the same base stats, but isn't this going to be less efficient than specialising? I suppose you know what you're doing.
Also, we're going to have to pay special attention to roads - how is a road built? Are roads laid by specific units? I know the road algorithm is functional and draws all relevant roads, we now need to ensure road building and destruction fits in with this...
I don't hate you really...:)
-
Yeah you're right, it will take a long time to make some walls. One turn per square of wall (assuming one construction yard). The interim construction depends on the number of factories.
The more construction yards, the quicker the production (one building or unit, per turn, per construction yard).
Having all the buildings share the same type (as outlined above) is not less efficient, merely a different way of doing it.
Roads will be built by RMV's As soon as a road is constructed, the framework will handle it the display of it.