Jump to content


Community Members
  • Posts

  • Joined

  • Last visited

1 Follower

Previous Fields

  • First Name
    This account is suspected to be a duplicate of Yekaterina
  • Last Name
    See the About me page for a note from the forum moderators

Profile Information

  • Location
  • Interests
    Improve the AI performance. Sincerely help this open source community.
    提高AI性能 真心帮助这个开源社区

Recent Profile Visitors

435 profile views

NitroVicky's Achievements


Discens (2/14)



  1. One new update from me: enhancedAI.pyromod This installer contains 2 improved AI programs. Venus is a more conservative upgrade that can't go wrong. Elytra is stronger but may be subject to bug warnings. I added 4 more difficult levels to the hardest one. In these four levels, bots get buffs in combat and more economic benefits. Instructions: Download the pyromod installer, then open the installer with 0AD. Select the module difficultbots, double click to activate it (it will be moved to the grid at the bottom of the screen), then save the module settings and restart the game To prevent ambiguity in the translated text, please refer to the original description: venus 是个比较保守的升级版, 不会出错。 elytra 更强但是有可能会受到bug警告。 在最难的基础上我加了4个更难的等级。 在这四个等级里,机器人会得到在战斗上的buff和更多的经济优惠。 安装步骤: 下载pyromod安装包,然后用0AD打开安装包。 选择这个模组 difficultbots,双击来激活(会被移到屏幕下方的大格子里),然后保存模组设置并重启x游戏
  2. A possible cause of the blurring is the peculiar screen resolution of Apple computers, you can force the window resolution to 1920x1080 by editing local.cfg. Add these two lines at the top of the file: xres = 1920 yres = 1080 It will improve your scaling performance, because this is the common resolution 16:9.
  3. I have a naive workaround idea for this, not sure if it would work: My interpretation of how a replay works: The replay file seems to be a list of turns and the commands received from each player in each turn. As you watch the replay progress, the game computes what would happen due to these inputs, by referring to the mechanisms (Javascripts) and data (XML templates) stored in binaries/data/mods/public/simulation. By progressing through the file, the engine reconstructs the match. Scrolling back would be difficult because we need to reverse the reconstruction. The engine is designed to move forward in time, not backward. The workarounds: When we want to scroll backwards, invert all scripts and multiply all data value by -1 to reach its opposite. This would cause the evolution of the match to go backwards. Generate a temporary file storing the exact state of all entities at each turn while the replay is going forward. When we scroll backwards, we just specify which turn we want to go back to and the engine can generate the scene at that turn using the already computed data. Obviously this file would be huge, so it should be deleted automatically as soon as the user exits the game.
  4. These features would make watching replays and speed-up AI matches much more convenient: A slider to instantly jump to any point in the replay, much like watching a video in a video player. Faster speed-ups, x32, x40, x50. This is especially useful for watching 2 AIs fight against each other. Are these feasible features to make?
  5. I would like to change the colour of the dark blinds that cover unexplored area: This darkness looks very sinister and I am a bit demotivated to go into it I was wondering if it's possible to tweak some lines of the source code or edit a file so that the unexplored area is covered by a more inviting colour, e.g. green, or some pattern to decorate the edge of the known world? I want to do this just for myself, locally. I'm not asking for anything official to be implemented as I think the dark blinds are good for some maps' themes.
  6. I haven't been able to beat Elytra at extreme 3 or above. Extreme 1 and Extreme 2 were manageable. Please try it and give me some feedbacks!
  7. Understood. I personally don't mind the AI cheating because it's very weak... any kind of cheating to strengthen it would be good. Even if it knows what I am doing, it can only watch its death coming! I'm not sure how to do that. I think the blinds could be made prettier than just pure blackness. If someone can point me to the texture file of the blinds that would be very helpful.
  8. If you watch a replay from the perspective of an AI, you can see the entire map even if the bot has not explored at all and Revealed Map = False. This is not to too bad at the moment, but either you forgot to implement the blinds for the AI, or the AI can see everything automatically. Not sure whether this is an intended feature or a bug. Watching player replays are fine. There is the blind to cover unexplored area.
  9. I've made the first version of an improved AI - ElytraBot. You can install it as a mod using this Pyromod file. It is a separate bot from Petra so now you can make 2 different AIs fight against each other! elytrabot.pyromod Features: Adds 4 "extreme" difficulties on top of "Very Hard" for both AIs, each featuring more bonus in gathering rates and discounts in training and building. At every difficulty level, Elytra can confidently beat Petra of the same level on all maps. Sometimes it can beat Petra of one or two levels above! Elytra is more focused to economic development and larger scale attacks. It does less expansions and less harassments.
  10. Now I change the attack strategies. For full scale attacks, I increased the minimum number of units participating so that its attacks would be more fruitful. For small early raids, I inhibited the use of infantry and limited it to only "fast-moving" (aka cavalry) class so that it can reach the enemy quickly without delaying the build-up at home. if (type === PETRA.AttackPlan.TYPE_RUSH) { priority = 700; this.unitStat.Infantry = { "priority": 0.1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Infantry"], "interests": [["strength", 1], ["costsResource", 0.5, "stone"], ["costsResource", 0.6, "metal"]] }; this.unitStat.FastMoving = { "priority": 1, "minSize": 10, "targetSize": 11, "batchSize": 1, "classes": ["FastMoving+CitizenSoldier"], "interests": [["strength", 1]] }; if (data && data.targetSize) this.unitStat.Infantry.targetSize = data.targetSize; this.neededShips = 1; } else if (type === PETRA.AttackPlan.TYPE_RAID) { priority = 10; this.unitStat.FastMoving = { "priority": 1, "minSize": 3, "targetSize": 4, "batchSize": 2, "classes": ["FastMoving+CitizenSoldier"], "interests": [ ["strength", 1] ] }; this.neededShips = 1; } else if (type === PETRA.AttackPlan.TYPE_HUGE_ATTACK) { priority = 900; // basically we want a mix of citizen soldiers so our barracks have a purpose, and champion units. this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 50, "targetSize": 80, "batchSize": 5, "classes": ["Infantry+Ranged+CitizenSoldier"], "interests": [["strength", 3]] }; this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 50, "targetSize": 70, "batchSize": 5, "classes": ["Infantry+Melee+CitizenSoldier"], "interests": [["strength", 3]] }; this.unitStat.ChampRangedInfantry = { "priority": 1, "minSize": 0, "targetSize": 18, "batchSize": 3, "classes": ["Infantry+Ranged+Champion"], "interests": [["strength", 3]] }; this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 0, "targetSize": 18, "batchSize": 3, "classes": ["Infantry+Melee+Champion"], "interests": [["strength", 3]] }; this.unitStat.RangedFastMoving = { "priority": 0.7, "minSize": 1, "targetSize": 20, "batchSize": 4, "classes": ["FastMoving+Ranged+CitizenSoldier"], "interests": [["strength", 2]] }; this.unitStat.MeleeFastMoving = { "priority": 0.7, "minSize": 1, "targetSize": 20, "batchSize": 4, "classes": ["FastMoving+Melee+CitizenSoldier"], "interests": [["strength", 2]] }; this.unitStat.ChampRangedFastMoving = { "priority": 1, "minSize": 0, "targetSize": 15, "batchSize": 3, "classes": ["FastMoving+Ranged+Champion"], "interests": [["strength", 3]] }; this.unitStat.ChampMeleeFastMoving = { "priority": 1, "minSize": 0, "targetSize": 15, "batchSize": 3, "classes": ["FastMoving+Melee+Champion"], "interests": [["strength", 2]] }; this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 0, "batchSize": 1, "classes": ["Hero"], "interests": [["strength", 2]] }; this.neededShips = 1; } else { priority = 700; this.unitStat.RangedInfantry = { "priority": 1, "minSize": 50, "targetSize": 90, "batchSize": 3, "classes": ["Infantry+Ranged"], "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; this.unitStat.MeleeInfantry = { "priority": 1, "minSize": 40, "targetSize": 50, "batchSize": 3, "classes": ["Infantry+Melee"], "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; this.unitStat.FastMoving = { "priority": 1, "minSize": 0, "targetSize": 30, "batchSize": 2, "classes": ["FastMoving+CitizenSoldier"], "interests": [["strength", 1]] }; this.neededShips = 1; } The trick was increasing the minimum number of each unit type to ensure a large army.
  11. I've made attempts to solve some of these issues. I first made changes to config.js at 0ad/binaries/data/mods/public/simulation/ai/petra/config.js this.Military = { "towerLapseTime": 9000, // Time to wait between building 2 towers "fortressLapseTime": 5000, // Time to wait between building 2 fortresses "popForBarracks1": 40, "popForBarracks2": 95, "popForForge": 120, "numSentryTowers": 1 }; this.DamageTypeImportance = { "Hack": 0.075, "Pierce": 0.095, "Crush": 0.010, "Fire": 0.015 }; this.Economy = { "popPhase2": 150, // How many units we want before aging to phase2. "workPhase3": 200, // How many workers we want before aging to phase3. "workPhase4": 250, // How many workers we want before aging to phase4 or higher. "popForDock": 30, "targetNumWorkers": 40, // dummy, will be changed later "targetNumTraders": 0, // Target number of traders "targetNumFishers": 0, // Target number of fishers per sea "supportRatio": 0.35, // fraction of support workers among the workforce "provisionFields": 2 }; // Note: attack settings are set directly in attack_plan.js // defense this.Defense = { "defenseRatio": { "ally": 1.4, "neutral": 1.8, "own": 2 }, // ratio of defenders/attackers. "armyCompactSize": 5000, // squared. Half-diameter of an army. "armyBreakawaySize": 1000, // squared. "armyMergeSize": 2000 // squared. }; this.priorities = { "villager": 800, // should be slightly lower than the citizen soldier one to not get all the food "citizenSoldier": 800, "trader": 1, "healer": 1, "ships": 1, "house": 550, "dropsites": 500, "field": 450, "dock": 1, "corral": 1, "economicBuilding": 90, "militaryBuilding": 200, "defenseBuilding": 1, "civilCentre": 1, "majorTech": 500, "minorTech": 50, "wonder": 1, "emergency": 1000 // used only in emergency situations, should be the highest one }; This part seems to determine its difficulty; the multipliers give the AI a bonus gathering rate and train time reduction. So I changed the easiest mode to the same as the hardest Petra AI, then the harder modes to more insane values. PETRA.Config.prototype.Cheat = function(gameState) { // Sandbox, Very Easy, Easy, Medium, Hard, Very Hard // rate apply on resource stockpiling as gathering and trading // time apply on building, upgrading, packing, training and technologies const rate = [ 1.00, 1.3, 1.5, 1.7, 2, 5 ]; const time = [ 1.00, 0.7, 0.5, 0.3, 0.2, 0.1 ]; const AIDiff = Math.min(this.difficulty, rate.length - 1); SimEngine.QueryInterface(Sim.SYSTEM_ENTITY, Sim.IID_ModifiersManager).AddModifiers("AI Bonus", { "ResourceGatherer/BaseSpeed": [{ "affects": ["Unit", "Structure"], "multiply": rate[AIDiff] }], "Trader/GainMultiplier": [{ "affects": ["Unit", "Structure"], "multiply": rate[AIDiff] }], "Cost/BuildTime": [{ "affects": ["Unit", "Structure"], "multiply": time[AIDiff] }], }, gameState.playerData.entity); }; At the new "Very Hard" level, this improved AI can beat 7 regular Petra AIs like I do! It still makes the same mistakes but the shear cheating bonus makes it dominate all.
  12. The AI, PetraBot, certainly can be improved. It often uses bad strategies and is weak; I consistently beat 7 AIs all teamed up against me. So I am trying to improve the AI behaviour by tweaking its code and I would appreciate any inputs / suggestions. Firstly, I will identify a list of imperfections with the current AI: Suicidal early attacks - sends some units to attack you but then suicide all of them at your civic centre. It doesn't know how to retreat. The long march also delays their development by a huge amount. Wasting resources on non-essential buildings and techs: Greek theatres, towers, wonders (even though it's far from reaching the limit population and needs to spend resources elsewhere) Wasting time on capturing / damaging non-essential buildings, especially suicidal attempts at fully garrisoned fortresses. Poorly optimised army: too many siege units, too many mercenary units but not enough real fighting force. Does not interact with the player - they don't seem to care about what you are up to; they just attack walls and towers as they wish. Unwise expansions - too many civic centres placed at poorly chosen areas when they really need to defend their main base. Suicidal support units: they send women and traders into battle or under enemy towers Not playing: when checking the replays, I often see the AIs doing absolutely nothing for some time. If you spot any additional flaws, you are more than welcome to append to the list.
  13. @Stan` I couldn't join the server using the link from linktree because it's a channel ID and not an invite link. One can only join a Revolt server through an invite. I would appreciate it if you can update it to a valid invite link. Thank you! This one worked.
  14. I'm afraid I can't join the server via the link given. When I click on it, I am brought back to my Revolt homepage. Can you tell me the name / title of this server, so that I can discover it from the community searcher? I checked the system usage monitor when using these apps, Revolt consumed less RAM and less CPU percentage than Discord. However, the difference is not very dramatic and it could have been due to more activity by Discord users. Logically, both programs are similar but Revolt has less advertising features so it's more efficient to use. Discord would have to waste effort in popping up advertisements to convince you to buy Nitro and tell you about updates etc, which also distracts you at the same time. I see that IRC can achieve the necessary features using some workarounds, but it's still a bit less convenient than Revolt in my opinion. However, it is definitely superior for totally anonymous chats
  15. Some maps are designed to be resource-scarce hunger games maps. On those, you have to be clever and think about other ways to survive, e.g. mercenaries. Most maps however, do offer plenty of wood. I would recommend sending all early units except 5 or 6 women (gathering berries) to the forest. In total you will need about 20 workers lumbering. Also try to get the wood axe technology as early as you can. Please see the first few minutes of the attached replay for some ideas, I didn't struggle with wood. Maps such as Acropolis Bay, Sanhyadri Buttes, Gulf of Bothnia, Mainland, Gear, Lorraine Plain, Ratumacos and Continent all have reasonable amount of wood available. metadata.json commands.txt
  • Create New...