Author Topic: Annikk's Mechanics  (Read 10654 times)

0 Members and 1 Guest are viewing this topic.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #60 on: July 30, 2011, 12:33:04 AM »
Maybe Attribs and the apperance of Defense Trees can play in a role, meaning that high strength(which is what I've learned determines the most part of the mine) compared to the two others will trigger a mine if a defense tree is at availability :)

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Annikk's Mechanics
« Reply #61 on: July 31, 2011, 12:36:11 AM »
Nope.  I would need to figure out how the AI will decide whether to make Super Seedlings or a mine.  I could just make it random I suppose..
random seems good and fair to me...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #62 on: July 31, 2011, 01:15:34 AM »
But... But! Random is so RANDOM D:

And random would significally decrease the danger the AI gives, for example, lets say random is 50/50, then tharmy would in theory become half of the normal size! Meaning the player can actually stand a fair chance without getting any powerboosts(events?) or making two AI's crush eachothers forces before cutting in!

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #63 on: August 15, 2011, 02:00:02 PM »
Annikk, have you any way of testing the speed that your AI runs in? I've had an idea for speeding it up...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #64 on: August 15, 2011, 02:05:54 PM »
Annikks AI runs each tick, 60 times a second :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #65 on: August 15, 2011, 02:22:02 PM »
Oh yeah, so it does... I suppose it might be loocked to that then, unless I can fit in a workaround to my idea...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #66 on: August 15, 2011, 02:24:34 PM »
do a for loop before selecting an asteroid, the loop will be extra "iterations" which will give more speed to the AI :)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #67 on: August 15, 2011, 06:40:10 PM »
By default, IAI selects one asteroid for checking per "cycle" of the while GameRunning() loop.  On a large map with 60 asteroids, this means by the law of averages each asteroid should be checked roughly once per second.

In AIinit() there is an inbuilt "iterations" variable.  It is set to 1 by default, meaning "check one asteroid per cycle".  If you wish you can increase this, which will have the effect of making IAI react faster, at the cost of CPU time.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #68 on: August 15, 2011, 06:43:28 PM »
I think you explained it better than me :P Although, it's your AI :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #69 on: August 15, 2011, 08:53:28 PM »
Hm. Oh well, nevermind what I said before then. On reflection, it wouldn't have worked anyway...

Try reading PiL Chapter 9, you may be able to do something with that to make it more efficient. At the very least, it explains what coroutine.yield() means.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #70 on: August 15, 2011, 08:56:46 PM »
Whats PiL? o.O

Never heard of it... BTW, I'm probably going to update my AI in a few days, I got no idea how I'm going to implent it, but thats why you got backups riiight? :D

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #71 on: August 15, 2011, 09:04:09 PM »
Programming in Lua. Pretty much the first go-to for Lua stuff. The first edition is free online, but the second edition you have to buy. First edition was written for Lua v5.0, second for 5.1, though first edition is basically all usable still. The second edition is bigger and more up to date, but like I said, you have to buy it. Link below explains it all much better, also gives you the first edition contents page.


http://www.lua.org/pil/

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #72 on: August 15, 2011, 09:11:43 PM »
Ohh, that page, I've used that for all my basic lua problems(lua-only related) to solve them...

Shortcuts 4 names...

BC wins

  • Seedling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 39
Re: Annikk's Mechanics
« Reply #73 on: August 16, 2011, 07:37:42 PM »
By default, IAI selects one asteroid for checking per "cycle" of the while GameRunning() loop.  On a large map with 60 asteroids, this means by the law of averages each asteroid should be checked roughly once per second.

In AIinit() there is an inbuilt "iterations" variable.  It is set to 1 by default, meaning "check one asteroid per cycle".  If you wish you can increase this, which will have the effect of making IAI react faster, at the cost of CPU time.


not i didnt know this but its weird huh, I mean in all games AIs are always so much faster then a human player, yet u can always beat them with ease :P

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #74 on: August 16, 2011, 08:45:54 PM »
Handicaps and their thinking is so much shorter than a humans, so they suck more than the player, though the Handicaps disappears the harder the difficulty is, the thinking usually stays the same.