Jump to content

AI Programmer application - Mina Sami

Recommended Posts

Position: AI Programmer.

Do you understand that Wildfire Games is a non-commercial project, work for 0 A.D. is volunteer, and work is done for free? Yes

Do you agree to distribute all your work for Wildfire Games under Creative Commons Attribution Share-Alike license? Yes

Are you sure you are not wanting to work on something programming related? (Then you don't need to send in an application form.) It is programming related

Name: Mina Sami Gorgi

Email: minas (dot) gorgy (at) gmail (dot) com

Location: Cairo (GMT+2)

Availability: Currently: at least 10 hours. 6 months from now: not really sure. I am graduating this year so I can't really give an accurate estimate but I'll probably still be contributing.

Age: 22

Occupation: Senior Computer Engineering Student

Skills and Experience: Resume

Motivation: I greatly love what I am doing and what new experiences it allows me.

Personality: A creative thinker and avid learner.

Short Essay: I really found about WF from 0AD about 3 years ago but had already heard about WF in general years before. The most amazing thing about this project is the fact it's open-source. I mean I didn't really believe back then that there could be such a large-scale well-developed game like this and still be open-source. Being cross-platform as well is a huge bonus. But generally, I always wanted to develop AI for games since I played my first RTS game as a kid. So, I seek fulfilling my dream and gaining experience by joining 0AD.

Interests and Hobbies: I am greatly interested in music. I have studied music theory, I play the guitar a bit, currently learning to play the saxophone and occasionally teach children how to sing. I like to keep fit so I go to the gym regularly and I am interested in sports in general but specially tennis table and football. I also like playing video games -don't we all-.

Staff: I don't know anyone personally but I have came across a few while suggesting participating in GSoC this year.

Community: I guess for gaming just YouTube. Yes, I am not a real hardcore gamer.

Favorite Game: Currently: League of Legends thanks to Lutris. Honorable mention: Dota since it runs on Linux via Steam. Overall: I think Age of Empires and Command and Conquer. 0AD is a huge candidate once campaigns are up.

Work Examples: I don't have such that are directly related to the position, the closest may be the Scrabble AI I took part in developing last semester where I was actually in charge of the research team. Other relevant work examples are mentioned and linked in the resume. 

  • Like 6
  • Thanks 1
Link to post
Share on other sites

@Itms @elexis

Hello and thanks for the application ! 

As you read in the application, programmers need not apply. Positions are granted after a certain number of contributions. That depends on the value and the number of those. 

So I'd suggest you read the documentation on how to get started on trac.wildfiregames.com if you haven't already. Let me know if you need anything else :)

  • Like 1
Link to post
Share on other sites

Thanks @stanislas69.
Sorry, the question " Are you sure you are not wanting to work on something programming related " was a bit confusing for me since English is not my first language. My bad tho.
I've already started on the given link by successfully building 0AD. I was waiting for an "approval of proposal" to get to the next steps but seems I don't need that. I guess I will be exploring the tickets and getting in touch with the devs on IRC then.

Edited by Mina
Fixed grammar
  • Like 6
Link to post
Share on other sites

I think the application forms come from back in the day when 0 A.D. hadn't been open source yet. Indeed http://trac.wildfiregames.com/, especially http://trac.wildfiregames.com/wiki/GettingStartedProgrammers are the entry points. The AI receives some information via C++, but other than that it is written almost exclusively in JS, so it is easy to start modifying it. I've also wondered whether it wouldn't be cool to have multiple AIs and have them fight each other (reminds me of playing counterstrike offline against bots).

While you can probably find some tickets on trac, I would recommend to start playing the game, become a bit familiar with how it's played, and find some obvious defects or missing feature of limited scope. In your case you might want to observe bots playing instead of playing yourself. If there are errors popping up, that can give you a good starting task. Other more obvious choices are "silly" behavior of the AI that could be redesigned (silly for every human, but it's not so easy to detect such behavior with code). For example trade routes through enemy territory were a frequent example. I don't know if the author who is currently working on a fork of 0 A.D. has worked on that. If you have specific questions about the Petra AI, you will probably get a more qualified answer from them, as Petra is the product of mimo. There was a previous AI in 0 A.D. called aegean by wraitii, but that was removed long ago. Creating a new AI sounds really good, but there are many strategies that need to be accounted for. For example I imagine naval transport to be difficult. But perhaps one could also start with an AI that is optimized for Mainland.

In case you have created some kind of patch, 0 A.D. also provides the possibility to run games from commandline without graphics, allowing to test it more quickly, see README of the source.

  • Like 4
  • Thanks 1
Link to post
Share on other sites
7 hours ago, elexis said:

For example trade routes through enemy territory were a frequent example.

P147 might be of some help if you are interested in starting off with that. (There are issues in that paste needs to be fixed)

Alternatively, you can try to get the AI to upgrade things by using P146. (This paste has even more issues, but well...)

You can start off with anything you feel comfortable with, I am just merely providing some past wip that may be of some help.

Link to post
Share on other sites

Thanks @elexis and @(-_-). Your replies are really helpful. 
I think I have a good long-term plan set up now. Will start by checking small fixes/patches like ones provided above experimenting their effect on game-play, to get accustomed with the code base and development cycle. Hopefully afterwards I will move into more advanced issues like short-range pathfinder and ultimately developing a new AI if that's aligned with the project's plans which would be a great experience for me.

  • Like 2
Link to post
Share on other sites

Hello and welcome!

Please register at trac (where issue tickets are filed) and at phabricator (where patches are submitted), if you've not yet done so already.

The AI files are located under simulation/ai/. A few issues I can think of:

  • Currently many templates are hard-coded in the AI, e.g. simulation/ai/petra/tradeManager.js lines 92 and 97. This is unproblematic for 0 A.D.'s default distribution, but it makes Petra less suitable for mods, therefore it would be great if all those hard-coded template paths could be replaced with e.g. classes, to make the AI more flexible.
  • The AI treats elephants as if they're siege units, e.g. simulation/ai/petra/attackPlan.js lines 351 and 616; again, this is potentially problematic for mods.
  • The AI never builds any walls, which makes their bases relatively vulnerable.

If you're really ambitious, you could also consider writing a completely new AI, so people can choose between Petra and yours, but that's more something for the very long run.

[Off-topic]: @elexis, @Itms, @stanislas69, perhaps Petra should be separated from the public mod?

Link to post
Share on other sites
13 hours ago, elexis said:

Creating a new AI sounds really good, but there are many strategies that need to be accounted for. For example I imagine naval transport to be difficult. But perhaps one could also start with an AI that is optimized for Mainland.

There are also two old AIs on GitHub. One is by @agentx 


and the other is way holder and written in Haxe


You can also get in touch with

There is also (I'm not sure exactly what that is)


Then you could try implementing openai for it

And finally you could get in touch with those students who tried to make a Python AI


2 hours ago, Nescio said:

Off-topic]: @elexis, @Itms, @stanislas69, perhaps Petra should be separated from the public mod?

You can separate Petra from the public mod. However it is deeply linked to the engine because it chats directly with it. So it might be a bit weird to do so because it's part of the main game. I believe a lot more people play against IA than in multiplayer.

  • Like 1
Link to post
Share on other sites
3 hours ago, Nescio said:

 Perhaps Petra should be separated from the public mod? 

I had split the public/mod mod into pyrogenesis/pyrogenesis-gui/gaia/0ad mod in a branch to #5366.

The entire simulation code is moved to pyrogenesis, so that 0ad doesn't introduce any simulation code, and other mods like 500ad can just come with artwork and templates without adding any code or reintroducing gaia artwork. Ideally the AI would be agnostic of the 0ad templates and balancing, so that it supports everything that the pyrogenesis simulation system supports. Then the AI could become part of pyrogenesis and reused by any mod without modifications. At least the code left Wildfire Games version of Petra is dependent on 0ad, so that I was wondering too whether it should be made a separate mod back then. The problem with splitting into too many mods is that it can increase the effort of the user to activate all mods necessary to play 0ad against an AI, and it leaves the possibility for the user to forget enabling Petra AI and then wondering why there is no AI opponent available. Now that Petra is developed independently, there is another considerable benefit to splitting it, which would be that the code can be disabled with one click and replaced by a different mod. But that would require the new Petra to be compatible with vanillas codebase, which sounds unlikely. If it was compatible, then one can launch the new Petra without splitting the old one into a mod (relying on .DELETED whre needed). So still not sure what's better. Mostly the splitting is useful for redistributing everything that is wanted but nothing more (for example redistributing pyrogenesis with a game content mod but without 0ad).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...