Leaderboard
Popular Content
Showing content with the highest reputation on 2026-09-22 in all areas
-
Hi all, I'm Josue (josue on Gitea), a fairly new contributor. I want to share a project I'm about to start, get your feedback before I write code, and later hand you a fork to test and pick apart. The itch Petra is a solid executor. It gathers, builds, places, trains and fights well. But it plays the same linear game on every map, against every opponent: gather, age up, train, attack the nearest Civic Center, repeat. It doesn't use terrain, it doesn't read you, and difficulty is mostly a handicap (gather rate ×0.42 on Sandbox up to ×1.56 on Very Hard, plus some caps). Meanwhile the game ships 51 historical heroes across 15 civilizations: Hannibal, Alexander, Vercingetorix, Leonidas, Fabius Cunctator, Viriathus, Themistocles... and the AI never fights like any of them. Petra's Leonidas doesn't hold a pass. Petra's Fabius doesn't delay. Nobody builds Alesia. The idea https://gitea.wildfiregames.com/josue/0ad/src/branch/strategos/mvp1/docs/strategos Split the bot into hands and head. Hands stay Petra: economy, building placement, gathering, queues, trade and garrison mechanics, the actual battle. The head is new: a small strategy layer that picks a stratagem: wall the choke by the river and wait; build a trade network; garrison the towers along the enemy's approach; strike their army while it's strung out in a pass; fall back. A stratagem enters Petra through one door (Headquarters), which hands it to the manager that already knows how to execute it. The ambush and the Persian trade network go through the same channel. Who picks the stratagem? We write the doctrine, a model judges. Civ doctrine: read from the civ bonuses that already exist as data. Romans fortify, Carthage goes to the sea and to elephants, Persians trade, Spartans hold ground. Hero archetypes: 5–6 playbooks mapped to the heroes: siege builder, ambusher, hammer and anvil, hold the pass, delayer, naval raider. Stages triggered by the game, not the clock: early game follows the civ doctrine; mid game picks a hero and runs their playbook (hero dies → next hero); when heroes run out the AI goes defensive: commerce and fortification. Opponent model: is the other player rushing, booming or turtling? Where is their army heading? Are they weak at sea? This is what changes every game, and it's what Petra has never had. The model doesn't invent strategy. It answers typed questions ("hold, strike or fall back?", "rush, boom or turtle?") with probabilities. That's a classification job, which is why a small model can do it. Free and open, by design The target model is Laya (convaiinnovations/laya on Hugging Face): Apache 2.0, 421M parameters, a classifier that answers typed questions and runs on a CPU (the model card says roughly 200–450 ms per question on CPU; I haven't measured it yet). Optional download (~650 MB). Without it you get plain Petra; nothing changes. No account, no API key, no network, no cost. Multiplayer-safe: only the host runs the model, and its decisions go out as ordinary network commands. Clients don't need the model, lockstep holds, replays replay. This also sidesteps floating-point differences between platforms. One engine change is needed for it: today the server drops commands sent on behalf of another player unless cheats are on (NetServer.cpp), so the host must be allowed to send this one command type for AI-controlled slots. Single-player is unaffected. Mod first: a strategos mod that overlays only the Petra files it touches. Default Petra stays untouched. An honest note on prototyping: to learn quickly which questions matter, the very first prototype uses a hosted typed-question API (TypeSafe's Jev), called from an external Python script through the existing RL interface. That is developer scaffolding only. It will never ship and players will never need it. Both models take the same question format, so swapping to the local model doesn't change the questions. Performance: what it costs Lag is already the most common complaint, and AI plus pathfinding are big parts of it. Today every AI runs on the simulation thread, on every client, every turn. So this has to be designed not to make it worse: The in-engine part is tiny. Petra reads at most one hint per played turn and hands it to a manager it already runs. I'll measure Petra's turn time (the existing PetraBot bot (player N) profiler section) with and without the mod, and publish the numbers. The target is ≤5% overhead. The model never runs on the simulation thread. At 200–450 ms per question on a CPU, running it inline would freeze the host, and in lockstep that means everyone. So questions are asked every few seconds (not every turn), inference runs on a worker thread, and the answer comes back as a command a few turns later. The engine already has a TODO for exactly this pattern (async AI tasks that return after a fixed number of turns, in CCmpAIManager.cpp), and it lines up with the ongoing threading work (#5874). If that helper gets built, Petra's own heavy analysis could use it too. Only the host pays. Clients run nothing extra. The host pays CPU on a spare core, plus the model's memory (roughly 0.5–1.7 GB depending on quantization; I'll measure and publish it). It won't fix lag. I'm not promising a speedup. At best, stratagems replace some of Petra's per-turn strategic scans with a cached decision; that's a side effect, not the goal. How it relates to existing plans From the Gameplay Feature Status and Game Performance wiki pages: Advanced AI is listed as "partially complete" (#973, #3003). The terrain and threat reading here (choke points, the enemy's approach) overlaps #3003 ("Petra should be aware of dangerous areas"). Anything reusable goes upstream on its own. The naval raider archetype depends on #3002 (Petra using ships for warfare), so it comes later. Directional attack bonuses (flanking) aren't implemented, so "hammer and anvil" can only win through positioning and surrounding, not a flank bonus. I'll keep the playbooks honest about what the game actually rewards. "Ambush" here is AI behavior (hold a choke, strike at the right moment). It's unrelated to the concealment mechanic in #3177. Narrative and strategic campaigns were cut from Part 1. A historically flavored opponent in skirmish is a cheap way to get some of that feeling back. How I'll prove it (before anyone gets excited) MVP of the MVP: one map with clear choke points, one stratagem (ambush at the pass), one question (hold, strike or fall back). Three arms on the same seeds: vanilla Petra ambush + a dumb distance rule ("strike when their army is within N metres") ambush + the model Arm 2 vs 1 measures the stratagem; arm 3 vs 2 measures the model. Before any game, the model has to beat the rule on 50–100 hand-labeled game states. If it can't, I'll post that result here too. Roadmap Phase 0: headless Petra vs Petra harness through the RL interface; determinism checked through replays. Phase 1: the hint channel (a new strategos-hint command → Headquarters dispatch). JS only, no engine changes. Phase 2: choke points extracted from the passability grid. Phase 3: the ambush stratagem in Petra. Phases 4–5: rule arm, labeled dataset, model arm; results posted here. After that: the local model on the host, outside the simulation (optional ONNX Runtime dependency, off by default), the small network change above, then more stratagems, civ doctrines, hero playbooks, the opponent model. What I'll share, and what I'm asking I'll share: Everything in my fork, https://gitea.wildfiregames.com/josue/0ad (branch strategos/mvp1): code, match results, replays and the labeled dataset, for anyone to test, reproduce or tear apart. Fixes, as normal PRs, for the RL-interface bugs I run into along the way. #7854 and #7628 look like the first ones I'll hit. I'm asking for feedback from: Petra maintainers: is a single "stratagem hint" entry point in Headquarters acceptable, or would you prefer a different hook? Engine folks: what do you think of an optional ONNX Runtime dependency behind a build flag, off by default? Players and history nerds: which hero should fight how? Which maps have good passes? Everyone: is this a direction the project would consider upstream one day, or should it live as a mod? Either is fine with me. Disclosure: I drafted this post with help from an AI assistant (Claude). The plan and the decisions are mine, and any code will go through the normal review process.4 points
-
Screencast+from+2026-09-22+02-47-35.webm Screencast+from+2026-09-22+02-49-43(1).webm Better? Also another demo about cavalry movement now : Screencast+from+2026-09-22+02-53-38.webm3 points
-
2 points
-
2 points
-
Okey, altough there does not seem to be much interest, I promised it... there is a little tent left, that rome captured and does not decay after destruction of all the rest, and this keeps rome for the engine in a state "Not lost all critical resources". Altough a tent despite a house can not train woman, so it is over for rome. What is special, due to the palms next to the tent it is almost invisible in the mini map.2 points
-
Unfortunately it's mainly modifications to the game engine itself, meaning it's not possible to wrap into a mod. But I can help out by providing a couple of demo videos for you : (I had to compress the videos) Screencast+from+2026-09-21+22-14-52.webm Screencast+from+2026-09-21+22-13-08.webm Screencast+from+2026-09-21+22-11-19.webm For testing you will need to know how to compile the game. Which makes things difficult I'm aware.2 points
-
These are videos from a current work in progress to implement different forces into unit motions, like inertia, knockbacks and charge attacks! The values would be very customizable in unit templates for mods too! Screencast+from+2026-06-04+23-57-24.webm Screencast+from+2026-06-18+18-01-22.webm Screencast+from+2026-06-18+17-53-13.webm1 point
-
I drew significant inspiration from popular titles and leveraged my own experience in photo and video editing, alongside the indispensable assistance of AI.1 point
-
By the way, there's no issue on Gitea for this yet as far as I'm aware. Would you mind opening one?1 point
-
For slingers you could for sure give the elite ones with lead/clay bullets more damage and range than militia or tribal units with stone projectiles (EB2 does this). Any more skilled unit would also probably fire a bit faster. Does this game have accuracy mechanic? i think some of the Scythians in the DE mod dodged projectiles at least.1 point
-
I know in some cases poorer troops used wood javelins hardened with fire but not sure this was the case with Greeks. Less accuracy would be the best way to portray the difference in troop quality, if it's not possible i guess less damage and less range is good enough. They could also have less HP (lighter equipment, less morale, less trained in melee combat).1 point
-
Maybe this channel could be useful for you, they explain the models they use for their other channel, Yarnhub, and describe the capabilities of each machine in quite some detail:1 point
-
You can see how "solid effect" of "stiffness" impact the boats in the video. You get super cool effects when there are a few ones, but a lot of them result in them taking a lot of time to settle. It's fine for boats as you rarely think of crowds of boats, and I just made a scene for this in the video to show that it works, and still look good for them. But if you have a crowd of infantry constantly wiggling and taking forever to settle, this would look very bad. Hence the spring. Inertia and pushing aren't the same thing. But for navigating on open terrain, this wouldn't change much. However if you try to funnel "solid" physical bodies into a choke-point, they obviously take a while more to achieve the same movement. So if ever we wanted to make cavalry "solid bodies", with this PR it's only just one tweak in their template. But because big crowds of them cost more to simulate and that moving them around take longer if they are in high number, it should be accompanied by an increase of cost/population for example. The pros are that they will have much more realistic charge effects, like you see with elephants, but cavalry have less contact area and are moving much faster, the physic outcome would be different too (like a cavalry can trow fewer infantry units away but at higher velocity). So this is just a balancing change, out of scope. Even without proper "charge", -so just using the old pushing pretty much as it was, the inertia improves physics for cavalry fighting at no additional cost. The cavalry can push away other spread units thanks to it's superior weight, and also push its target by a little - even if ideally it would be more, and the cavalry would be smart enough to take more advantage of it instead of stopping once in front of it's target. Screencast from 2026-09-22 18-44-41.webm1 point
-
thanks, @Emacz That's great to hear, and close to what phosit suggested above: named openings instead of Petra's threshold flags. I had a look at your repo (Emacz2/classical-warefare-aea); the expertDecision/ stage machine and build-order planner are very much the "hands" side done well. A few questions: 1. The AI looks tied to Classical Warfare units (Athenian Marine etc.). Is there a version that runs on vanilla, or an older build with the 4 random strategies? I'd like to use it as a second, stronger baseline in my headless harness (fixed seeds, Petra vs Petra). - will be funny, to have different AI battling each other 2. "Breaks Very Hard by 10 min, then 15 more to finish": the finishing problem (when to commit and end the game) is one of the questions I want to measure. Any intuition what it's missing there? Happy to compare notes; your work is a good deterministic baseline against which anything model-driven has to prove itself. Where I think we differ, and why I'm not just doing the same: your expert AI makes Petra stronger, with a well-tuned build order and a stage machine, and it works. What I'm after is variety: a Petra that plays differently as Sparta under Leonidas than as Carthage under Hannibal, that holds a pass on one map and builds a trade network on another, and that reacts to what the opponent is doing. Strength is a side effect there, not the goal; the "expert" doctrine could well be one of the openings a civ picks. So the two are complementary: your work is the hands, mine tries to be the head.1 point
-
Hi, i closed your PRs as you didn't reply for some months. Feel free to reopen them. Nice that you work on this. I also had plans to use AI to improve the Petra. (Not to integrate it but to use it to see where Petra is bad at.) Integrating it that much goes (for me) against the free software philosophy. Every code should be possible to understand. You want the AI to choose a strategy. But you also want the AI to say when to end an attack (fall back) and how a hero should fight. Thous seem pretty different tasks. I think it's bad to solve both with the same system. Currently there are starting-strategies witch are chosen from. It would be good when you take a look there. Maybe you can extend that. The model you choose takes language as "state". Yes it can be json formated and yes it's multilingual but i'm not sure it understands something like {"type":"repair","entities":[177],"target":4030,"autocontinue":true,"queued":false,"pushFront":false,"formation":"special/formations/null"} Why? There has recently been a PR wanting to do a similar thing for Petra. As i remember it the conclusion was to not continue the plan for now. I don't think that it is possible to do it in a mod.1 point
-
1 point
-
1 point
-
Hi everyone, I've been looking into the possibility of creating Proto-Germanic voice lines for the Germans in 0 A.D. First, a note about AI: I used ChatGPT to help me find linguistic sources and prepare the first word suggestions below. This is preliminary research, not a finished translation. I'm not a historical linguist, and the proposed forms have not been independently reviewed by one. Some of them may well be wrong. No audio has been generated yet. My idea is not to reconstruct exactly what the Cimbri spoke around 100 BC. As far as I understand, the surviving evidence simply doesn't allow this. Instead, I would like to find a reasonable linguistic approximation that fits the historical setting of 0 A.D. and sounds good in the game. We only need about 18 short voice lines. Ideally, they should be one or two syllables long, but I don't think this needs to be a strict requirement. Before experimenting with recordings or text-to-speech, I would like to get the words and their pronunciation into a reasonably good state. 1. Which language should we use? Release 28 describes the Germans as a coalition of the Cimbri, Teutones, Ambrones and other Celto-Germanic groups. Official Release 28 announcement The linguistic situation seems rather uncertain. For example, Gilles Quentel discusses early contacts between Continental Celtic and Germanic. There are also different interpretations of the surviving names of the Cimbri and Teutones. Bichlmeier and Blažek discuss several possible etymologies of these tribal names in their 2020 publication. I think reconstructed Proto-Germanic could be a reasonable common language for the faction, as long as we make clear that this is an approximation, not a reconstruction of an attested Cimbrian dialect. There is also the question of the First Germanic Sound Shift and its chronology. For our purposes, I would initially use a consistent reconstructed Proto-Germanic pronunciation rather than trying to reconstruct a hypothetical earlier dialect specifically for 100 BC. Of course, I would be interested in other opinions on this. 2. First suggestions for the voice lines I used the English meanings from the Audio Voice List, with the Latin translations as an example: Audio Voice List – 0 A.D. Wiki The following is a working draft, NOT a finished or academically validated translation. All proposed Proto-Germanic words and forms are reconstructions, not directly attested historical expressions. Some of the specific forms still need linguistic verification. Most candidates were initially found through Wiktionary's Proto-Germanic reconstruction entries, which often refer to etymological dictionaries such as Kroonen or Orel. However, I have not independently checked every individual reconstruction against these books. I also used the freely available Proto-Germanic grammar by Winfred P. Lehmann and the IE-CoR linguistic database. Some forms are more tentative than others. I have marked the particularly uncertain ones instead of pretending that we already have a complete solution. Selection and greetings English Proposed form Notes Hello hailaz! Literally "healthy, whole". A possible greeting, but not an attested Cimbrian one. What is it? hwat? Simply "what?". Shortened for gameplay. My lord? frawjô? "Lord", without "my". The appropriate form of address should be checked. Movement and fighting English Proposed form Notes I will walk gō "I go / walk". I will fight fehtō "I fight". The meaning and exact form should be checked. I will attack! hwētō! "I attack". This candidate needs further linguistic checking. I will march! farō! "I go / travel". Not specifically military marching, but perhaps sufficient for a short acknowledgement. I will retreat! wīkwaną "To yield / retreat". This is still an infinitive. A shorter and grammatically appropriate spoken form is needed. Battle cry open Perhaps a non-verbal shout would work. Alternatively, a short expression based on a reconstructed verb for fighting could be considered. I would not want to invent something and present it as an authentic Germanic battle cry. Working and gathering English Proposed form Notes I will build timrō "I build". I will work land arjaną "To plough". The appropriate short spoken form still needs checking. I will gather samnō "I gather / collect". I will herd drībō "I drive". This could refer to driving livestock, but is not exactly the same as tending a herd. I will fish fiskō "I fish". I will repair bōtī "Improve / make good!" Not specifically repairing a building. The form and its use in this context need checking. I will hunt huntōn- Reconstructed verb stem only. The precise form and vowel length remain open. I will heal hailī "Heal!" An imperative rather than "I will heal". The exact form needs checking. Regarding hunting, the IE-CoR database gives huntōn- as its reference form, but its explanation also mentions hūnton-. The vowel length and the actual spoken form therefore need further checking. Other (I will put myself into) garrison — felhō Intended meaning: "I enter / go inside". This is one of the least secure suggestions and needs both lexical and grammatical checking. It is not an attested term for entering a garrison. A few remarks about the list The grammatical forms are not consistent yet. Some are first-person forms, others imperatives, infinitives or reconstructed stems. Personally, I don't think every response necessarily needs to be in the same grammatical form. The important thing is that it works as a short and natural-sounding acknowledgement in the game. However, we should make sure that the individual forms are actually plausible and not simply invented by an AI. Also, several suggestions deliberately use a broader meaning than the English original. For example, "I travel" instead of "I march" or "I drive" instead of "I herd". These would be gameplay decisions, not exact translations. I would be happy to replace any of these suggestions if there are better alternatives. 3. Sources Here are the main sources I found. Historical background Gilles Quentel (2012): Early Linguistic Contacts between Continental Celtic and Germanic: Lexical Aspects. Publication on ResearchGate Harald Bichlmeier and Václav Blažek (2020): "Cimbri" et "Teutoni". Journal article – Acta Linguistica Lithuanica Václav Blažek: On chronology of the First Germanic Sound Shift (Lex Rask – Grimm). Publication via DOI These publications discuss historical names, etymologies and linguistic developments. They do not provide translations of the 18 voice lines. Grammar and pronunciation Winfred P. Lehmann: A Grammar of Proto-Germanic. University of Texas at Austin. Complete online grammar The chapters on phonology and inflection are particularly relevant. R. D. Fulk (2018): A Comparative Grammar of the Early Germanic Languages. Publisher's page – Open Access e-book The complete e-book is freely available. I have not worked through the whole book, though. Vocabulary IE-CoR – Indo-European Cognate Relationships Linguistic database One useful example is the entry for "hunt": IE-CoR: hunt. It references Kroonen's Etymological Dictionary of Proto-Germanic and also illustrates why some details need further checking. I also used Wiktionary's Proto-Germanic reconstruction entries as starting points for individual words: Proto-Germanic reconstructed terms Some examples: fehtaną – to fight timrōną – to build fiskōną – to fish hwētaną – to attack These entries are helpful for finding possible forms and references, but they are not a substitute for checking the original academic literature. 4. What is still missing? Before recording anything, I think we would need: Someone with knowledge of historical Germanic linguistics to review the suggested words and their grammatical forms. A consistent pronunciation guide, preferably using IPA. Better solutions for the uncertain expressions, especially retreat, repair, healing and garrison. A decision on the battle cry. A way to produce natural-sounding recordings that can be freely distributed with 0 A.D. I know there has already been some discussion about AI-generated content in the project. I'm not attached to using AI for the final audio. Human recordings would be fine as well. For now, AI has mainly helped me find sources and put together this preliminary list. I would be interested to know whether AI-assisted linguistic research is acceptable for this kind of contribution, and what the requirements for the final recordings would be. 5. Questions Does this general approach make sense for the Germans in 0 A.D.? Would reconstructed Proto-Germanic be a suitable choice, or should we consider another linguistic approach? And is anyone here familiar with historical Germanic linguistics who could help check the proposed words and pronunciation? I would be happy to continue working on this if there is interest. Thanks!1 point
-
I am catching up with a long backlog of unread stuff from a couple months of absence, so I am seeing the excellent housekeeping work you folks have been performing on the issues. Great job and thanks!1 point
