Jump to content


Community Members
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by agentx

  1. I'm all for same information for humans and bots in the game, that's why I coded scouts to explore the map, to find treasure and to detect resources instead of just reading resource or passability maps. I published a video in a another thread showing them in action. But that's not the point here, instead it seems the commandline interface broke since A16 and automated testing is no longer an option. Apparently bot developers are now expected to clickfest their way through the GUI to test specific maps and civs. So, any AI which depends on heuristics, genetic algorithms, neuronal networks or machine learning are now impossible. At least for developers who don't have the resources to pay a huge team of testers and equip them with machines. Hannibal consists now of +20,000 lines of code including a triple store, a query language, a HTN planner, a path finder and other modules. All loops are hand optimized and run fast in native code. It launches autonomous groups to build a village, scout the area or gather resources. Units know when to hide in buildings or to counter attack based on their health status and their tasks. They rebuild the fields and buildings if destroyed they are responsible for. It explores the technology tree of its civilization to research only the technologies advantageous for the map to play and the enemies to fight. The project is at 80%, missing now is combat action on land and water, which needs the most testing. The units will detect weak points of the opponents based on a potential field explored by scouts to no start suicide missions. I don't want to give up now, not at this stage and not with all the features implemented and goals accomplished so far. I'm quite sure Hannibal will be a resourceful enemy in single and multiplayer games, challenging you to constantly come up with new strategies and tactics. If anybody reading this is willing to help out with testing, please let me know. //agentx.cgn[]gmail.com\\
  2. > But all by all, you shouldn't rely a lot on the civ you get, you should rely on the CC you start with to see what you can produce. Remember that mods can add civs you've never heard of before. Sure, my fault. However, I can't produce enemies at the CC. How do I get their civ? And have a look at gamestate.js, looks like that whole thing is no longer reliable, too. m.GameState.prototype.applyCiv = function(str) { return str.replace(/\{civ\}/g, this.playerData.civ);};m.GameState.prototype.civ = function() { return this.playerData.civ;};m.GameState.prototype.currentPhase = function(){ if (this.isResearched("phase_city")) return 3; if (this.isResearched("phase_town")) return 2; if (this.isResearched("phase_village")) return 1; return 0;};m.GameState.prototype.townPhase = function(){ if (this.playerData.civ == "athen") return "phase_town_athen"; return "phase_town_generic";};m.GameState.prototype.cityPhase = function(){ if (this.playerData.civ == "athen") return "phase_city_athen"; else if (this.playerData.civ == "celt") return "phase_city_gauls"; return "phase_city_generic";};And when comes to buildings, the units I've started with can build these things below, but the engine doesn't accept them, probably also unreliable now: structures/{civ}_housestructures/{civ}_storehousestructures/{civ}_farmsteadstructures/{civ}_fieldstructures/{civ}_corralstructures/{civ}_outpoststructures/{civ}_dockstructures/{civ}_barracksstructures/{civ}_blacksmithstructures/{civ}_templestructures/{civ}_marketstructures/{civ}_defense_towerstructures/{civ}_wallset_stonestructures/{civ}_civil_centrestructures/{civ}_fortressstructures/{civ}_wonderI'm tempted to ask what else is now considered unreliable, but I'm not sure whether the list of reliable things is shorter. Anyway, I'm happy I didn't delete A16, which was also faster. Mimo, if you read this, search Petra for 'applyCiv'. Hopefully nobody expects bots to build structures or research technology or even survive beyond phase village.
  3. Using this: ./pyrogenesis -quickstart -autostart="scenarios/Arcadia 02" -autostart-ai=1:hannibal -autostart-ai=2:petraI get this from sharedScript.playersData: PLAYER: name team civ phase pop ally enmy neut 0: Gaia -1 gaia village 0 100 011 000 1: Player 1 -1 athen village 7 010 101 000 2: Player 2 -1 cart village 7 001 110 000However, the map is defined like this: "PlayerData": [ { "Civ": "spart", "Name": "Player 1", "Team": -1 }, { "Civ": "gaul", "Name": "Player 2", "Team": -1 } ],Which is what the game actually plays. Is there a new way for bots to determine own and opponents civ?
  4. > Detecting small obstacles and making a group, like if it was a big box. Got it. Problem is trees are dynamic, too many boxes to update. Otherwise yes. @wraitii: the long range pathfinder dealt with trees? What do you mean by not an issue? Facts would help to understand.
  5. > Maybe defining trees as a group for pathfinder would be better ? It would, but the amount of freedom for map maker in 0AD should remain, imho. I'd prefer the editor indicates problematic regions, in red, like the other helpful obstructions/passability overlays. So map makers can choose to design for efficient multiplayer maps or visual pleasing single player maps and players do not wonder why the 12,000 trees giant map isn't suitable for an 8 player combat with a Pentium class machine.
  6. I think trees are a special case of obstruction. They are smaller than a tile and probably only an issue if they come as a forest. And then it depends on their distance/density. Effectively they can turn a map into a complex labyrinth breaking any pathfinder. Some maps have thousands of trees and since pathfinder have to look at both sides of any obstruction this leads to a combinatorial explosion very quickly. Probably there should be tool and/or best practice guide for map maker. It is easy to create maps which are a challenge to any pathfinder. In that way the map is slow and not the pathfinder.
  7. I have the suspicion pathfinder lags are closely related to the amount of trees on a map. Here are my ten largest commands.txt https://dl.dropboxusercontent.com/u/354885/0ad/comms.txt.ax.zip I can extract the amount/density of trees from the maps, should show some correlation.
  8. Would you mind to run a test comparing maps with different amount of trees and both little water? 1 human, 3 petra bot is good
  9. > certainly connected to pathFinder When was the last time the pathfinder has been profiled?
  10. I wouldn't say the pathfinder is slow, there are only some edge cases where it is extremely slow. If full map scans can be avoided it is barely noticeable at all.
  11. Makes sense, there is no difference for ships and land unit are on he safe side. Might reduce area for docks and landing, but that needs more than one tile anyway.
  12. > neither deep nor shallow water Would you set them to deep or shallow?
  13. > the slope map is [X-1]*[X-1] in size because you need 2*2 heights to get a plane witch than has a slope. Yes, that's documented for *.pmp and leads to a very tiny offset in NE direction, barely a pixel. > Afaik there is a tool that let´s you set passability. Maybe you need some tweaking ? Sorry, should have mentioned the passability info is needed to steer a bot's units around. No chance to edit maps while playing.
  14. There are two other issues, on the left is a height map I've imported into atlas, in the middle the resulting passability map and on the right both blended, they do not align on the east side. Also, deep sea and shallow water do not connect. There is a gap indicated by black pixel below. What is the trick to get a continuous passability?
  15. I've been looking for opposite pairs possibly describing a bot personality like: Fortification - Spreading/ClaimingDefensive - AttackingExploitation - BarterWhich gives a nice 3D space a bot can choose of. However the pairs are not exclusive, e,g, exploitation includes claiming. Also it depends on the map, which brings me to cheating: Humans memorize maps. LOS is most interesting on the first play, from there it is getting more and more relative. After the fifth replay you know form where the attacks are coming and build towers likewise. Currently bots can't remember maps. They could however include pre-compiled information about maps/scenarios. If any of the devs might fancy an "online brain" for bots I'm all ears, all needed is a kinda XMLHttpRequest object supporting GET/POST/HEAD. Maps is only one thing, even more interesting is a database of players and their strategies. Who wants to play the same game twice?
  16. I've found a way to render internal maps on a HTML canvas providing some visual confirmation. Only the passabiltiy map gives some headache. pathfinder.xml defines these PassabilityClasses: unrestricteddefault <MaxWaterDepth>2 <MaxTerrainSlope>1.0ship <MinWaterDepth>1building-land <MaxWaterDepth>0 <MinShoreDistance>1.0 <MaxTerrainSlope>1.0building-shore <MaxShoreDistance>2.0 <MaxTerrainSlope>1.25The API knows these classes + values: //uneval(sharedScript.passabilityClasses);pathfinderObstruction:1, foundationObstruction:2, building-land:4, building-shore:8, default:16, ship:32, unrestricted:64 Here are the classes rendered using the Arcadia 02 map: (the mouseover title shows the mask value) pathfinderObstruction is surely no-go area for everything. What I want is where land/water units can go, so default looks good for land, however slope is not indicated in the map and ship also has area on land indicated. I know I can bitmask what I need, but somehow API and pathfinder.xml do different things. Which one is reliable?
  17. > but I think traders, heroes, etc. shouldn't be reserved for the highest difficulties. Good point. There is a another catch: Assume multiple bots, how do you compare them at same difficulty, if the criteria behind are more or less subjectively chosen by the dev?
  18. It depends on the user model. I assumed users advance by adding features to their repertoire, you seem to assume users start with the full set of features and advance by improving. The reality is probably in between and different for each user. But I think it is easier to reason about difficulties if basically it is about switching features on/off and not moving along a scale.
  19. I'm also trying to make this ladder useful to beginner. I like no attacks for sandbox and very hard as unleash everything. May I suggest no technology for easy? So: - sandbox: no attacks, no tech - easy: no tech, simple economy, no rush - medium: advanced economy (, no barter?) - hard: advanced combat (, no heros?) - very hard: no limitStill lacking a useful criteria for hard... Btw, am I right the AI settings dialog could be a mod and the selected settings just go straight into bot constructor? Spending extra options for AIs without compilation?
  20. > here are the new results. Just wow!
  21. Just came across this article of a guy doing pathfinding with WebGL, which is slow because getting the texture back is only supported pixel by pixel. However, his Game of Live using same architecture is freaking fast, so OpenGL might support a faster way. If I understand it correctly the algorithm resolves multiple paths requests per call and time only depends on size of map. Probably the expertise of writing a shader to do pathfinding is quite rare within single mind, but 0AD has shown quite some prolific synergy effects, so I wanted to check if this solution rattles some nerves.
  22. Don't worry Hepha, this is just an attempt to move load/save game up the priority list. We know, the day the devs stop asking for commands.txt it is done.
  23. Yes, you can click that button, but no amount of AI code make it work as expected.
  24. I could install from debs found here: https://launchpad.net/~wfg/+archive/0ad You need 0ad + 0ad-data + 0ad-data-common. Expect to solve a few dependencies manually, gdebi will tell you which.
  25. Still waiting for a proof the game is save compatible....
  • Create New...