-
Posts
79 -
Joined
-
Last visited
-
Days Won
1
Posts posted by lexa
-
-
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!
- 3
-
Ok, I have set
xres = 1680
yres = 850
And
windowed = true
Now it works
-
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?
-
Also a way to get the chat messages typed by users would be nice (see what i mean?)
-
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.
-
in fact in the svn ( http://svn.wildfiregames.com/public/ps/trunk/binaries/data/mods/public/simulation/ai/ )
I have found also
- scaredybot
- testbot
-
mmmh
so, we have these bots still compatible svn version rigth?
- JuBot (distributed with the game)
- qBot (distributed with the game)
- Marilyn (zip in this post http://www.wildfiregames.com/forum/index.php?showtopic=15483 )
- SplitBot ( http://code.google.com/p/split-bot/ )
it is a first step to a wiki page with third party bots / maps ... ?
-
ah ok, thank you
you mean the svn of 0ad sources? All the bots are distributed with 0ad?
-
It's been a while since I did not touch SplitBot...
Did someone try to make bots fight together?
I need to make some comparisons because I am not a good player, so I guess I should get some inspiration from other bots techniques...
Not sure to have the latest versions of all bots. Is there a place where they are listed with download links?
-
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... Don't hesitate to challenge me and see if we can get something interesting before Ykkrosh starts his job
-
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
-
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.
-
Hi,
Just to say that I was waiting for the day when you start the task "Better engine support for AI scripts"
Did I miss it??
Thank you Philip for your work!
-
Maybe there is no way for the AI to know if a place is obstructed because of this special obstruction of the farms...
-
I will test it again with newest build from svn and 0ad.dev repository. Maybe I didn't wait enough 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
@:0Ok, 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?
-
It could be because farms have a special obstruction? Units can walk over them.
Yes this is it, but how can an AI know ?
-
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";
-
After about 5 minutes the latest splitbot started throwing the error reported by gudo above: http://pastebin.com/ej2wS176 - it was building well up to that point.
Fixed
Can you verify it is ok?
The files are here in the trunk on google code
-
I can't get Splitbot to attack me. I simulated many battles and no attacks in 20 minutes. I am not attacking it. It builds base quite quickly and has much workers. Of course building placement bug slows it down a little. I am playing on build 10359 and alpha3 release of SplitBot.
I can not reproduce this, can you tell me your version of the game and the map, leave a comment here?
-
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
-
Does Splitbot work with the current alpha?
How soon can we expect to see it try and build a navy?
Split bot itself is in alpha
And for the navy, I thought about it, but it will be in another version than the v1.0
-
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!
-
+1 for the influence and for the CPU usage
And maybe the functions to build and train should be improved. They should let you specify success and error callbacks?
-
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
An event in Paris about 0ad to find contributors
in General Discussion
Posted
Hey, thx for your answer
I'll check that out before the event
Do you have links for the people to get started with AI bots development?