Light Style© by Fisana

Jump to content


Photo

A challenger appears : Marilyn (Yet-yet another AI)


  • Please log in to reply
159 replies to this topic

#61 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 315 posts

Posted 24 February 2012 - 12:16 PM

Very good, You is in the design of a new AI?:eek: (y)
  • 0

#62 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 24 February 2012 - 12:43 PM

No, I just decided during the Christmas Holidays to create a new AI. And since QuantumState, maker of qBot, is too busy to really work on qBot, I though I would keep on improving it.

@Pureon: that's planned, should not be too hard to do at least basically.
  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#63 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 315 posts

Posted 24 February 2012 - 01:00 PM

But QuantumState is redesigned and optimized it ( QBot ). I hope he will soon finish designing it, I am looking forward to it.

BTW: Can you solve the Qbot AI caused by game problem?:P


  • 0

#64 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 24 February 2012 - 03:10 PM

He has done a few modifications, but nothing fundamentally different, I think.

I'm not sure what you mean by your second question, could you rephrase it?

I've finished updating my attack plans to allow for more precise unit construction (archers, javelins and not only "ranged"), planning for raids. It was a bit of a pain, but it works.
  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#65 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 315 posts

Posted 25 February 2012 - 04:05 AM

Sorry, I mean: Qbot game lag, if you can solve this problem?
  • 0

#66 MishFTW

MishFTW

    Primus Pilus

  • Web Development Team
  • 1,920 posts

Posted 25 February 2012 - 04:38 AM

@Gameboy: I doubt qBot is causing the game lag, probably just your hardware.
@ wraitii: Great progress so far! My only suggestion: get this thing to make forts. Lots of them. And archers (or other range units) to go with them. They'll help Marilyn :)
  • 0
Mish [Adarash Mishra]
Wildfire Games Webmaster
Email Me | About Me

#67 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,966 posts

Posted 25 February 2012 - 07:23 AM

Got this error playing against Marilyn.

Attached Files


  • 0

#68 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 25 February 2012 - 09:01 AM

I can't see what would cause that, unless you played a civilization that has no known ranged infantry (the Romans perhaps?)... Anyway it's not important because that part of the code has been completely rewritten.
  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#69 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,966 posts

Posted 25 February 2012 - 09:03 AM

I can't see what would cause that, unless you played a civilization that has no known ranged infantry (the Romans perhaps?)... Anyway it's not important because that part of the code has been completely rewritten.

Romans have their skirmisher (Veles).
  • 0

#70 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 315 posts

Posted 25 February 2012 - 12:12 PM

My hardware is no problem, I have a 4G DDR3 memory is indeed the problem of Qbot game lag.
  • 0

#71 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 25 February 2012 - 06:28 PM

Okay, yay new version.
Actual improvements this time around:
-Attack plans are better, and I implemented a "raid the villagers" type of attack... It's much of a work in progress, like the attack plans in general (this is really the one area that's freakin' hard to implement... No wonder most AIs use "create an army and send it to enemy base" as a means of attacking.). Though not all civilizations will benefit from it (It uses cavalry swordsman, and I think only hellenes have an early access to those. It'll be changed in the next version). Test it out on Oasis.
-Attack plans are now started if the "maximum" amount of units are built.
-Generally more efficiency during attacks for attack plans and defense.
-gatherers should generally stay on their resource for longer, ie the AI will change their task less often.
-Queue manager changed again: more readable, more efficient, more modular (individual plans can be set as "most important"). Generally better and more efficient.

Technical stuff:
-Attack plans use their own queues, and generally rewrote those a lot. More modular now.
-Cleaned up the code further
-In the "reassignIdleWorker", it checks if they did something before and puts this as the top priority. This is good: workers will change tasks less often.
-Tactics can now split and regroup groups after initialization.

I'm not 100% sure every new stuff is bug free, but I playtested it fairly thoroughly, so it should work. Report any bug you encounter, as well as any weird AI reaction.
Download Link


Edit: darn ,still a problem I left over with garrisonning... Replace line 285 of "mil-Tactics.js" by this:
if (!entity || !entity.position())
And line 279 also needs to be changed to this:
if (!unit || (unit && !unit.position()) ){

Speed improvements over the economic manager are a bit countered because of the modifications to attack plans, but overall on "time warp" it's still faster than qBot on my computer.

Edited by wraitii, 26 February 2012 - 12:03 PM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#72 iap

iap

    Sesquiplicarius

  • Community Members
  • PipPip
  • 101 posts

Posted 25 February 2012 - 07:21 PM

Is this AI deterministic, in the sense that if the player will play (theoretically) twice exactly the same, then the AI will react exactly the same?
I was just thinking, if you have a modular queue manager, you can arrange the queue with a precise formula that will consider all the input to produce the perfect output, but you can make it adaptable, so it will learn during the game (or between games).
Am I making sense or is it a completely different thing?

(Sorry to burst in like that :P )
  • 0

#73 Zaggy1024

Zaggy1024

    Sesquiplicarius

  • WFG Retired
  • 173 posts

Posted 25 February 2012 - 07:49 PM

@Gameboy: I doubt qBot is causing the game lag, probably just your hardware.


Definitely not true. Currently, if you play with AI, it will cause lag. If the lag isn't bad from the beginning of the game, it'll only get worse as the game progresses, since the AI is trying to control more and more of the units it's created.
  • 0
Gregory Bertilson [aka Zaggy1024]

Wildfire Games | A.D. | Animator

#74 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 25 February 2012 - 09:14 PM

Is this AI deterministic, in the sense that if the player will play (theoretically) twice exactly the same, then the AI will react exactly the same?
I was just thinking, if you have a modular queue manager, you can arrange the queue with a precise formula that will consider all the input to produce the perfect output, but you can make it adaptable, so it will learn during the game (or between games).
Am I making sense or is it a completely different thing?

You're certainly making sense, but I do not have the skills to make it "non-deterministic". I'm not sure there is a point either. I think the AI in AoE3 is a bit what I'm trying to achieve : deterministic, but able to store a few things (such as "when the player attacked") and sort of react to that. Optimally, I'd like to be able to do that and better, but I'm unsure I have the skills required (I'm not a real programmer... Hell, I'm not even a programmer at all, I'm studying economics.)
I also have very little idea of what the team wants for their AI, though seeing what was already achieved, I think my ideas are not that faraway from theirs.
@Zaggy1024 : indeed.

Edited by wraitii, 25 February 2012 - 09:18 PM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#75 Pedro Falc„o

Pedro Falc„o

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 651 posts

Posted 26 February 2012 - 01:47 AM

I got beat by Marilyn! Playing Oasis I as the persians against Marilyn as Hellenes (Alpha 8 since i had some troubles getting the last version from the svn). I'm not very good a player, but i have to say it really surprised me to see this AI in action. She detected my attacks and sent defense before i could even see one of her buildings (does she ignore the fog of war?). At the last minutes, i packed some skirmishers and archers to scort the rams and noticed she gone for the first units of the formation, leaving the rams free to go for the civ centre, even though when i hit the civ centre she sent a small pack of melee soldiers to bring my rams down. She didn't exactly got me beat, but after she broke my army, i resigned.

Great work, wraitii, i think this is the way to go.
  • 0
Pedro Falc„o
Latin: Petrus Falco; Literally means 'Stone Hawk'.
English equivalent: ' Peter ';


Undergraduate Computer Scientist by UFCG
Shotokan Karate Adept, 3rd Kyu (Green Belt) & Muay Thai initiate

#76 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,966 posts

Posted 26 February 2012 - 02:38 AM

A problem with the AIs, Marilyn in particular, is that they will make plans and abandon them frequently, especially building foundations, like Civ Centres and Fortresses. The resources are already expended when the foundation is laid, so the bot should go ahead and build it, or delete the foundation and get the resources back. :) It also has trouble deciding when and where to build Mills. :/
  • 0

#77 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 26 February 2012 - 07:12 AM

Yeah, making an AI work properly for absolutely trivial tasks such as where to build a mill is what makes you realize the human brain is amazing.Marilyn restarts attack plans all the time for now, but it's "wanted", because it's the best way I found of making it work fairly properly for now.

@Pedro Falcao: yes, she ignores the fog of war... But I made her only detect incoming army in her territory to compensate. LOS I think could be added by some changes in the C++ code (there is support for human LOS, apparently AI LOS is possible to have at some point), but it would increase lag.
Attacking your rams however works as designed... The way the "battle manager" works now is to send units deal with each group of enemy , so your rams were detected a a new group and units were sent.

Edited by wraitii, 26 February 2012 - 08:21 AM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#78 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,617 posts

Posted 26 February 2012 - 10:52 AM

Lots of these errors:
http://pastebin.com/zqpHr7VK

Changing line 285 didn't help

(and debug messages)
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#79 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,655 posts

Posted 26 February 2012 - 11:19 AM

Mmmh, it looks like line 279 also needs to be changed to this:
if (!unit || !unit.position() ){

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#80 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,617 posts

Posted 26 February 2012 - 11:47 AM

Mmmh, it looks like line 279 also needs to be changed to this:

if (!unit || !unit.position() ){

Didn't fix it: http://pastebin.com/K3DMKaQ5
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com