if (!unit || (unit && !unit.position()) ){
A challenger appears : Marilyn (Yet-yet another AI)
#81
Posted 26 February 2012 - 12:03 PM
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.
#82
Posted 26 February 2012 - 03:47 PM
wraitii, on 26 February 2012 - 12:03 PM, said:
if (!unit || (unit && !unit.position()) ){Sorry wraitii, that still didn't fix it. But this time ignoring the errors I continued the game and had 2 Marilyn bots attacking and raiding my base from all sides until the lag (probably partly to do with the errors) caused me to stop the game. Very ferocious bot
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
#83
Posted 26 February 2012 - 04:52 PM
Btw, what map were you playing?
Anybody noticed that Hellenes cavalry raid specifically target your villagers?
Edited by wraitii, 26 February 2012 - 05:06 PM.
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.
#84
Posted 26 February 2012 - 05:35 PM
wraitii, on 26 February 2012 - 04:52 PM, said:
Anybody noticed that Hellenes cavalry raid specifically target your villagers?
I've been testing Marilyn on Spahbod's new random maps (on the svn now). The last 2 maps I used were 'Lake' and 'Phoenician Levant' - and I didn't use Romans or any island maps.
I noticed the raids were focusing on villagers - that worked well. The raids could be less predictable - smaller groups of attackers, maybe even 2-3 cavalry units minimum - enough to disrupt normal economic build-up. The few raids I saw involved around 10 cavalry units. I often disrupt the AI's early economy with 1 cavalry unit.
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
#85
Posted 26 February 2012 - 05:47 PM
I'm trying to improve the performance of my plan managers but it's proving harder to do than I expected... I'll look into the "defense error" thereafter.
edit: can't seem to reproduce the error you're having... Any details on how to do so?
Edited by wraitii, 26 February 2012 - 06:20 PM.
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.
#86
Posted 26 February 2012 - 06:35 PM
wraitii, on 26 February 2012 - 05:47 PM, said:
I'm using a clean version of the svn, so it can't be any other changes causing it. Try Marilyn as Persians... and then maybe 10 minutes in to the game, when Marilyn is attacking, the errors begin. Is Marilyn on github?
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
#87
Posted 26 February 2012 - 06:42 PM
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.
#88
Posted 26 February 2012 - 07:38 PM
wraitii, on 26 February 2012 - 12:03 PM, said:
if (!unit || (unit && !unit.position()) ){I have no knowledge at all about Java script but is the evaluation of such expressions fixed by the standard? I.e. is unit && !unit.position() evaluated from left to right and is the evaluation stopped if unit==false (without checking the second condition)?
#89
Posted 26 February 2012 - 08:00 PM
UV_Completion, on 26 February 2012 - 07:38 PM, said:
If javascript is like java (and very likely is), then all operations are read from left to right. So (suposing the operations are all java-like) the computer reads as following:
if unit is not true or (unit is true and unit.position() returns false), then...
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
#90
Posted 26 February 2012 - 08:12 PM
UV_Completion, on 26 February 2012 - 07:38 PM, said:
Yes, javascript does work in this way, with an || if the LHS is true then the RHS will not be executed and similarly with && if the LHS is false the RHS won't be evaluated. The first code
if (!unit || !unit.position() ){
that wraitii posted should work in an identical way though.
Jonathan Waller [ aka quantumstate ]
Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com
Support Wildfire Games!
#91
Posted 27 February 2012 - 01:25 AM
wraitii, on 26 February 2012 - 07:12 AM, said:
Pureon, on 26 February 2012 - 06:35 PM, said:
wraitii, on 26 February 2012 - 06:42 PM, said:
#92
Posted 27 February 2012 - 09:51 AM
@Pureon: I still find myself unable to reproduce this error... I guess I'll leave it alone for now, if it happens to you again and you have more information about what happens, I'd be very glad.
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.
#93
Posted 27 February 2012 - 12:45 PM
wraitii, on 27 February 2012 - 09:51 AM, said:
Sure thing. If it happens to me again I'll try to provide you with more info. I still think it has something to do with garrisoning - I use it a lot during raids/attacks.
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
#94
Posted 29 February 2012 - 10:58 AM
-Attack plans overhauled, started less frequently, more reliable, more efficient. Allowed raiding for any civ. Also added an option to "stay close" when attacking.
-tons of little optimizations here and there, and bugfixing. Optimization was needed since I now call Marilyn every two turn and not every 8 turns (like qBot)
-Defense manager also more reliable, able to detect when to stop pursuing (no more "a whole army chasing one unit on the whole map"), better at a few stuffs, generally more efficient.
-further overhaul of the worker assigner functions. It's factored by the gather rates, though this may be hard to notice
-Changed a few stuffs in the building orders and the priorities of the AI for better play.
Technicalities:
-added a function for bartering, though I haven't used it yet.
-implemented a few stuff from svn qBot.
The AI is now called every two turn, instead of every 8 turn for qBot. This is balanced by the fact not every function is called every turn, and tons of little (or fairly big) optimizations everywhere. testing against Svn qBot, it is more "frame efficient".
You should notice a much better ability at defending from the AI, though it may have a bit of troubles actually attacking.
Download Link
I'll soon be working again, so I will have much less time... Hopefully I'll be able to carry development on a bit. I'll need roman support, better attacks (this is really the one area where much work is needed), and ship support.
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.
#95
Posted 29 February 2012 - 11:34 AM
BTW: Next, you will do?
Solve the problem of game lag? Is QBot caused by lag.
Edited by gameboy, 29 February 2012 - 01:28 PM.
#96
Posted 29 February 2012 - 06:09 PM
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#97
Posted 29 February 2012 - 06:27 PM
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.
#98
Posted 29 February 2012 - 07:19 PM
wraitii, on 29 February 2012 - 06:27 PM, said:
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#99
Posted 29 February 2012 - 09:26 PM
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.
#100
Posted 01 March 2012 - 12:21 AM
Marilyn may have got stuck - it didn't defend its territory or itself when I finally invaded. I had 3 fortresses and it had only just started to build a barracks:

Hope this is somehow useful
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users














