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

#21 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 18 February 2012 - 08:58 AM

I think optimization, Water support, LOS support are bigger priorities.

Of course, better entity/template support is always better.

Edit: this will look dumb, but I just found out where the AI saved the screenshots it takes. Could prove useful.

Edited by wraitii, 18 February 2012 - 09:24 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.

#22 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 18 February 2012 - 03:28 PM

Speaking of which: Here is a new version of Marilyn, again changing barely anything but streamlining.

The attacks should now work properly (ie no units left behind, and the AI now can plan it's next attack while there's still one going on). I've also tweaked a few stuffs.
edit: see below for latest version

Basically, my TODO list is now "get the AI better at attacking/defending". Defense is still very very dumb.

Edited the front post.

Edited by wraitii, 20 February 2012 - 03:54 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.

#23 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 19 February 2012 - 06:17 PM

You're going to say I do this a lot, but here's a penultimate update (the last for the day, rest assured :) ).
I've started tackling the attack problem. It's still a very early development, but I implemented a class for dealing with inter army fighting (very-very basic for now), which should serve as a framework for further progress.
I changed a few stuffs in the way Marilyn attacks: she will now do one or two early raids, and will retaliate if you attack her and she's still got a standing army.

edit: see below for latest download.

I did a few tests against qBot (on Oasis, though , but I think Marilyn is, if anything, more adaptable), and while she isn't way stronger, she's got the upper hand:
-qBot craves for more food, but this might be civ-specific, and anyway Marilyn collected much more wood, stone and metal than qbot.
-qBot built more units, but lost more too (again, I think this is civ specific)
-qBot lost more buildings (including a town centre), and Marilyn regularly managed to send units in his base while qBot couldn't.

Any remarks and testing will be appreciated :)

Edited by wraitii, 20 February 2012 - 03:53 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.

#24 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 20 February 2012 - 12:08 AM

This sounds interesting I shall have to do some testing myself. Just to check, you are testing against svn?
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#25 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 20 February 2012 - 02:06 AM

I downloaded your latest iteration, and it gives a Javascript error upon loading the map. The Marilyn AI player then fails to do anything.

Marilyn.js line: 66
BaseAI is not defined
Failed to load Marilyn.js
  • 0

#26 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 20 February 2012 - 07:28 AM

@Quantumstate: no, testing against Alpha 8. Haven't got around to get the svn because compiling can be a bit of a pain on OSX for now. I don't see any reason why it wouldn't work, however (bar the fact Romans are not supported yet).

@Mythos_Ruler: that's weird. You're sure you have the "common-api" folder in your ai folder?
  • 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.

#27 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 20 February 2012 - 07:54 AM

@Mythos_Ruler: that's weird. You're sure you have the "common-api" folder in your ai folder?

I have the folder. :) You are only testing on Alpha 8 though. There have been changes to the API since Alpha 8, I believe. Someone correct me if I'm wrong.
  • 0

#28 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 20 February 2012 - 08:10 AM

I have the folder. :) You are only testing on Alpha 8 though. There have been changes to the API since Alpha 8, I believe. Someone correct me if I'm wrong.


Ah indeed, perhaps this has changed, I'll give a look.
(darn developers developing :) )
Edit: I don't see any of that particular code having changed... Seems like qBot does the same. Quantumstate, any idea?

Edited by wraitii, 20 February 2012 - 08:16 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.

#29 Thorfinn the Shallow Minded

Thorfinn the Shallow Minded

    Triplicarius

  • Community Members
  • PipPipPipPip
  • 471 posts

Posted 20 February 2012 - 10:36 AM

I usually destroy the bot before this becomes an issue.



I exploit the issue.
  • 0
To win, we must endeavour to be the stronger of the two at the point of impact. Our only hope of this lies in making our own choice of operations, not in waiting passively for whatever the enemy chooses for us."—Schlieffen

#30 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,748 posts

Posted 20 February 2012 - 12:19 PM

Hmm, I could be missing something, but it should at least hypothetically be possible to delete the AI folder in the game install and checkout just that part of the SVN source (as it's JavaScript it shouldn't be a problem). The only problem that I could see would be if there are some new C++ features added that the AI-API depends on. I don't think that's the case at the moment at least though, so it should be worth a try. Just make a backup copy of the folder just in case ;)
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#31 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 20 February 2012 - 12:40 PM

I just noticed a fairly serious issue with the economic manager that caused it to concentrate much less on food than it should. Something about my "maxperfield" parameter working and not my "maxpertree". Anyways, this made Marilyn very easily defeated in the long game.

I'm also updating my tactics manager to be usable over several turns instead of having to be reconstructed each turn, and a few other stuffs in defense.

edit: looked at the svn updates since Alpha 8... Can't see anything that would cause such an issue.

Edit: okay, this is worth another upload. here's the latest version:
Download
Changes are that Tactics is now usable over many turns (the defense manager uses it), and fixing a few balancing problems with the economy manager.
In the games I tried on Oasis (qbot vs Marilyn, with both playing both sides ( tested twice each configuration )), Marilyn is now superior to qBot in basically every aspect, but she's not that much of an attacker, so the game is pretty much a stalemate.

Edit2: actually, another update: I incorporated some of the svn-qBot changes, and mainly I optimized a lot the "reassignidleworker" function, so you should not experience any lag spike.

Edited by wraitii, 20 February 2012 - 03:53 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.

#32 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 20 February 2012 - 05:00 PM

Same marilyn.js line: 66 error. Happens on custom maps and random maps.
  • 0

#33 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 20 February 2012 - 05:17 PM

This is really extremely strange. Has anybody else tried on SVN?
  • 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.

#34 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 20 February 2012 - 06:00 PM

(fcxSayna mentioned the solution on irc) This error is caused because something has changed in the game engine where the js file load order is defined. Previously the _init,js file loaded first so it included the common-api. Now filenames starting with capital letters take priority, for some reason, so Marilyn.js gets loaded before _init.js causing the error. The temporary solution is to rename Marilyn.js to marilyn.js. The more permanent solution is to have a proper load order defined some some config file.

If you are trying to compare with qBot it is probably best to test vs svn, otherwise you are always testing against an old version so any improvements will not get taken into account.
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#35 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 20 February 2012 - 06:34 PM

Thanks, I certainly could not have guessed that.

I'm not comparing with qBot so much for actual comparison as for having a basis to compare with, so I'll wait for alpha 9 I think, unless you add some drastic changes (from what I've seen, there have been many smaller changes, but no drastic ones).
  • 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.

#36 UV_Completion

UV_Completion

    Discens

  • Community Members
  • Pip
  • 16 posts

Posted 20 February 2012 - 10:15 PM

I just ran a quick test with recent svn on Oasis II (qBot Carthagians, Marilyn Hellenes). The game segfaulted (without a useful error message) before the game was finished, but it looked like Marilyn got the upper hand towards the end. qBot had the better start but its attacks were too uncoordinated and slowly Marilyn gained ground.

There was one (non-fatal) java script error in Marilyn:
WARNING: It appears there is som sort of enemy army in my territory
WARNING: New land attack found.
WARNING: Asked for dropsite for wood at 439.1544189453125,394.7325744628906
ERROR: JavaScript error: simulation/ai/Marilyn/map-module.js line 18
TypeError: p is undefined
  ((void 0))@simulation/ai/Marilyn/map-module.js:18
  ((void 0),[object Array])@simulation/ai/Marilyn/terrain-analysis.js:108
  ([object Object],[object Object])@simulation/ai/Marilyn/Attack_city.js:373
  ([object Object],[object Object],[object Array])@simulation/ai/Marilyn/military.js:1040
  ()@simulation/ai/Marilyn/marilyn.js:154
  ([object Object])@simulation/ai/common-api/base.js:117
  @:0

It seems to be reproducible so if you need more information, let me know.

PS: The shortcut for the developer overlay (Shift+D) is non-functional at the moment. Somehow scrolling right has been assigned the same shortcut. Is this on purpose?

Edited by UV_Completion, 20 February 2012 - 10:18 PM.

  • 0

#37 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 20 February 2012 - 10:21 PM

PS: The shortcut for the developer overlay (Shift+D) is non-functional at the moment. Somehow scrolling right has been assigned the same shortcut. Is this on purpose?


It has been changed to Alt-D.
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#38 UV_Completion

UV_Completion

    Discens

  • Community Members
  • Pip
  • 16 posts

Posted 20 February 2012 - 10:26 PM

It has been changed to Alt-D.


Thanks. Is the Wiki page (http://trac.wildfire...om/wiki/HotKeys) meant to be for the developer version or the recent alpha? If the former, it would be nice if someone could update it.
  • 0

#39 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,748 posts

Posted 20 February 2012 - 10:48 PM

Thanks. Is the Wiki page (http://trac.wildfire...om/wiki/HotKeys) meant to be for the developer version or the recent alpha? If the former, it would be nice if someone could update it.

It's meant to be for both =) But yeah, in this case it's not necessarily meaningful to update just yet as that would cause confusion for players using the release version. (There are a couple other hotkeys which needs to be updated as well, see: http://trac.wildfire...changeset/11031 )
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#40 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,591 posts

Posted 21 February 2012 - 08:38 AM

I just ran a quick test with recent svn on Oasis II (qBot Carthagians, Marilyn Hellenes). The game segfaulted (without a useful error message) before the game was finished, but it looked like Marilyn got the upper hand towards the end. qBot had the better start but its attacks were too uncoordinated and slowly Marilyn gained ground.

Thanks for the report.
The error is actually fixed, it had something to do with counterattacks when all units are dead.

I'm upgrading the defense manager for now, using a defcon system. Also, a few economic stuffs.
  • 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.