Jump to content

lexa

Community Members
  • Posts

    79
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by lexa

  1. Hi I am lexa from split-bot in case some of you rember :)

    I am an active member of Silex Labs, a non profit organization which aims at helping people contribute to free and open source projects. We organize events in Paris, mostly work shops and sometimes a big conference for Haxe (next one is in may, with all the core contributors and community)

    Next week we have decided to start a series of workshop on programming 0ad bots. 2 workshops of 2 hours are planed to start and see how it goes (this link is in French)

    Has anyone already organized events for 0ad community? If you have any idea, recommandation, please tell me :)

    Please let the world know about this initiative and the other activities of Silex Labs (see April news letter or the blog)

    And let's hope that this will unveil new french contributors to 0ad!

    • Like 3
  2. Hello

    I have the same problem on my mac retina

    When I change the mac resolution to 1680x1050, it is almost ok : the screen size looks ok, but the mouse click has an offset of about 200 pixels up the actual mouse cursor...

    Maybe if I set the resolution in 0ad config files it would be ok, but how to do that on a mac?

  3. The events would be called at the start of each turn. I was not thinking at something complicated like events called outside of the AI turn

    The events are clearly a better way to go for me, because it is much more natural/standard and easy to use in javascript. And often I would use it without having a collection to update.

  4. Sorry, I'm not quite sure what you mean by this. Could you elaborate a bit?

    You mean the event thing to update the collections?

    For example, let's say you have a collection of all of your workers. Each time you build a unit, you would provide a "onBuildSuccess" callback. And in this callback, you could get the unit as a parameter. Anyway you could maintain the collection of your workers up to date in the code of the "onBuildSuccess" callbacks..

    I hope I was more clear this time... unsure.gif Don't hesitate to challenge me and see if we can get something interesting before Ykkrosh starts his job :)

  5. I find it good to have persistent entity collections, clearly

    but for the "automatic updating" of entity collections, I believe that it is better to have an event system which lets you update your model (keep the collections up to date), than to have this "binding"-like functionality

    just because in javascript and web languages it is much more common / standard

    and as far as I'm concerned, after a long time of practicing this languages for building complex web applications, I even prefer the callback version. the addEventListener version of an event system has a good point : you can add several listener, you will not prevent a callback to be called. but the problem is that at the end, it is much harder to debug. and also, callbacks force you to have a cleaner and simpler architecture.

    finally the preset filter functions should be useful. in splitbot i used a helper class to access these collection with a "cache" mechanism

    public static var myEntities:EntityCollection;

    public static var myPeopleUnits:EntityCollection;

    public static var myBuilderUnits:EntityCollection;

    public static var myBuildingStructures:EntityCollection;

    public function getMyEntities():EntityCollection

    public function getBuilders(entities:EntityCollection):EntityCollection

    public function getWorkers():EntityCollection

    public function getFondations():EntityCollection

    public function getBuildings(allowedTemplateNames:Array<String> = null):EntityCollection

    public function getResources(entities:EntityCollection, type:ResourceSupplyType = null):EntityCollection

  6. So, if I understand well, the main change will be in the way one can filter and keep entities organized?

    What I missed in SplitBot

    - persistance for the EntityCollections

    - ability to put metadata on a building when you start to build it (like you do it when you start to produce a unit)

    - an easy way to detect if a place is buildable with a given unit at a given position and orientation

    - an easy way to detect if there is water between a unit and a position

    What would really have helped me is an event system. To be able to give a callback and arguments in these cases:

    - when you start to build an entity or produce a unit: onBuildComplete and onBuildStoped

    - when you send a unit somewhere: onUnitArrived, onUnitBlocked

    - when you send a unit to harvest, onStart, onUnitBlocked, onResourceEmpty, onDropResource, onResourceIsFarAway...

    - ...

    Just in case it is useful to you : in SplitBot have filtered the entities in this arrays and used a kind of "cache" system to compute the array only one time per tour :

    I think that the "Filters.byMetadata" thing would make my life easier, would it be fast if done with a C function?

    And last thing : I do not think it is necessary to have the {'func': filter_function, 'dynamic_properties': ['owner', 'idle']} argument to keep a selection up to date. It can be done by hand easily if there are events.

  7. I will test it again with newest build from svn and 0ad.dev repository. Maybe I didn't wait enough :D For me its just strange if AI doesn't do anything aggressive within 20minutes.

    For now split bot attacks when it has more than 170 pop

    Edit: Got it. Gives error. I have had thought its not critical because bot was still running fine but this time I read it through. Seems it can't find where my CC is.


    ERROR: JavaScript error: simulation/ai/SplitBot/SplitBot.js line 128
    TypeError: me.getCivicCenter() is undefined
    ([object Object],"11",[object Object])@simulation/ai/SplitBot/SplitBot.js:128
    ((function (ent, str) {"use strict";var tmpDistance;if ((tmpDistance = org.zeroad.common_api.Utils.VectorDistance(ent.position(), me.getCivicCenter().position())) < nearestOponentEntityDistance) {nearestOponentEntityDistance = tmpDistance;nearestOponentEntity = ent;}return false;}))@simulation/ai/common-api/entitycollection.js:99
    ([object Object])@simulation/ai/SplitBot/SplitBot.js:126
    ([object Object])@simulation/ai/SplitBot/SplitBot.js:1059
    ([object Object])@simulation/ai/SplitBot/SplitBot.js:795
    ([object Object])@simulation/ai/SplitBot/SplitBot.js:775
    ()@simulation/ai/SplitBot/SplitBot.js:734
    ([object Object])@simulation/ai/common-api/base.js:91
    @:0

    Ok, thank you for the test, but it seems that you did not take the latest version from the trunk..

    And also it is like it can not find its civ center, which map do you use?

  8. For the placement of the buildings, I now check the whole surface for obstruction

    It still try builds farms over other buildings and fields...

    I tried with all passability classes which I have found :

    public static inline var FOUNDATION_OBSTRUCTION:String = "foundationObstruction";

    public static inline var BUILDING_LAND_OBSTRUCTION:String = "building-land";

    public static inline var PATHFINDER_OBSTRUCTION:String = "pathfinderObstruction";

    public static inline var DEFAULT_OBSTRUCTION:String = "default";

    public static inline var SHIP_OBSTRUCTION:String = "ship";

    public static inline var BUILDING_SHORE_OBSTRUCTION:String = "building-shore";

    public static inline var UNRESTRICTED_OBSTRUCTION:String = "unrestricted";

  9. Hmmm, not normal, it is supposed to work... Can you tell me more about your version of the game?

    -------------------

    im playin on 10288 the alpha 7 geronium...?!

    Hi, I can not reproduce this with the alpha 7 geronium

    Did you put all the split bot files in "C:\Users\lexa\AppData\Local\0 A.D. alpha\binaries\data\mods\public\simulation\ai\splitbot" ?

    On which map did you test?

    Please leave a comment here

  10. Simple to decide which AI is the best . Have an AI tournament . qbot vs JuBot , Jubot vs SplitBot . The winner of the two battles takes on each other in the final round to determine the winner .

    Run this on all the maps about a dozen time and calculate statistically who wins most of the time .

    Good idea, this is very

    If we do this, we should advertise it a little bit, set a date and make it a small event?

    But on a more serious note I think all AI developers should work together to incorporate best elements of there designs to create a good working AI for the game rather than competing with one another . Although friendly competition is always beneficial still the game at this point of time lack a good AI and the sooner it gets implemented the better it is for the game .

    I think that this kind of post is a collaboration and we try to understand what is good in each approach

    All of the AI's are under the same license so can in theory share things.

    Right!

  11. I'm not good player (I've lost almost all multiplayer games so far), but I personally haven't had enough time away from Alpha 8 to try the updated bot yet. The changes sound great though!

    Out of interest, how does it compare to qBot and Jubot?

    Just did some testing, and SplitBot is the "best" of the bots. Despite a whole bunch of building placement crazyness that causes it to waste considerable time, it still grows in population faster than the other bots, builds siege sooner and attacks in larger waves.

    Though an interesting idea occurred to me, perhaps it grows so fast because it builds slowly. Sure, it wastes resources when it puts the foundation down, but that blocks the builder agent from building and placing more buildings, freeing up more resources for spawning units. Plus, it gets those resources right back when it cancels the stuck structure. Essentially, the delay in building means an acceleration in spawning.

    Edit: I was playing some more 4 way FFA, when SplitBot started throwing errors.

    I have created a thread about AIs in general here

×
×
  • Create New...