AI (for cooperative and pro-Creeper missions)

Genybr · 3114

Genybr

  • Jr. Member
  • **
    • Posts: 7
on: December 21, 2009, 06:28:35 am
Prescript: making liquid enemy - is genius idea! Easy enough and hard to play enough!
But anyway it is not enough later, if the game will evaluate. So, not for now, but for future.

My main label of it is: "look what you do and say it to computer".
I.e. AI must not use math as main part of it.

So, model:
"Player" - ai, bot or a real one.
"X" - id of current player
"real map", "RM" - map of world.
"Player X Map", "PXM" - map of player.
"Modifed X map", "MXM" - pre-built map.

Player X gets RM to PXM (nothing but for fog of war or for approved constructions or actions)
Player X gets PXM to MXM.
At MXM Player X starts to pre-construct base ctructures
{Relocation
pre-built
construct}

Relocation
{Calculating possible time to interatction.
If relocation is possible looking up for space to relocate base. {Calculating possible time to interaction}
If relocation is possible {
on MXM constructing a "bridge" to new place.
If time of current relocation larger then time of interaction for targeting plase or current place then mark place "not for now".
For all of approved places looking up fatter
If fatter place is fatter then current place then relocate.}

Interaction
Distance FROM enemy, it's space with it's standard tactics or standard time remaining.

Pre-bulding
//stamping standard stamps of devices, also, some devices marked as "temporary" and some as "progressive"
//and it's level (now (Energy x10), soon(energy x20), later(energy x40+))
{Looking up for territory limitations (x,y)
Looking up for interaction
Looking up for resources
If at least 1 stamp is (price < energy == interaction*collection) then selects most effective stamp}

Construction
//If add t(time) in coordinates and order "destroy" then it make possible attack preview and etc.
//Here AI sees what shall it do.

{If free energy allows to construct new building from "progressive" them copying from MXM to PXM one-by-one.
If warn level is minimal then allows to construct only if 1 Energy Unit Collection or enough stock in energy bank is aviable. Allows only energy generators.
If warn level is normal and energy collection more then 1 then allow to construct only if energy bank stock+income is more than price else allow to built only energy generators.
If warn level is high then allow to built energy generators if time of interaction more then 3 times is still stable (lesser and maximal time of lesser and maximal time not highter then 10%) or energy collection 10%+ lesser then consumtion.
If warn level is Critical then panic.
If at least one item in at PXM is ok for warn level then first of it will sending to RM (creating new construction).}

Warn levels
{If time of interaction is more than full construct and full load of weapon then warn level minimal.
If time of interaction is more than full construct but not full load then warn level normal.
If time of interaction is less than full construct but more then full load or If enemy progress = 0% warn level high.
If time of interaction is less than full construct and full load of weapon then warn level is critical.}

//Incomes&losses for calculatings:
//Energy and killing creeper is income
//Energy consumption and time is loss.

Yes, I know about badly defined "stamps" and some mistakes about warn levels and action lines. But I did not creates normal AI anytime before =| Only for flowers =)
------------------------------------------------
....good music, good AI = best game. Isn't it?

If some words of text in this post is incorrect or you can't understand it - my PM is for it.
---------------
Zero. This is lemma.
1+1=1. 1-1=1. 0+1=0. I = 0. -_-.


dyla4nn

  • Newbie
  • *
    • Posts: 2
Reply #1 on: December 21, 2009, 08:33:52 am
thats some nice good thinking



Aurzel

  • Sr. Member
  • ****
    • Posts: 1853
  • If at first you dont succeed ... kill the b@$tard
Reply #2 on: December 21, 2009, 02:47:20 pm
layman's terms please?



Genybr

  • Jr. Member
  • **
    • Posts: 7
Reply #3 on: December 22, 2009, 08:22:44 am
Layman is what is this?

If some words of text in this post is incorrect or you can't understand it - my PM is for it.
---------------
Zero. This is lemma.
1+1=1. 1-1=1. 0+1=0. I = 0. -_-.


Aurzel

  • Sr. Member
  • ****
    • Posts: 1853
  • If at first you dont succeed ... kill the b@$tard
Reply #4 on: December 22, 2009, 03:30:55 pm
simple words for people not wanting to read all that or cant understand it