Let’s go over a few things freeciv!
Setting up the foundation right is the key to great development
I used to write on Medium before this, these are ports.
As I talked in my previous post, I have a keen interest in setting up a freeciv learning environment in python. But many people thought that the details were either far and wide or too many ideas were clustered into it. Over the next few posts I wanted to clarify any issues and lay the groundwork for the project.
Setting up an Open Source Project is more than easy these days, all you have to do is sign up a Github account and boom, you are ready! But the hard part is running and maintaining the codebase, and even harder is making people care enough to contribute anything to your project and I want to focus on the latter here. Through these posts I want to clarify my ideas and discuss the issues raised. This time around I want to go over these three points:
And in each of those points I will also put sub-points to make understanding easier.
I am not asking the very hard questions here, like why care about anything. But why care about this project?
1. Action Spaces
Every action in our universe can be broken down into two types, a continuous action space and a discrete action space. In layman terms discrete spaces are where hard decision need to be taken and continuous spaces a distribution is to be generated.
Self driving car operates in the continuous distribution
Montezuma’s Revenge is an Atari game with discrete action space. This also happens to be a notoriously difficult game for AI to master due to its sparse reward structure.
We do not need a single agent that is good at everything, in fact the future will be filled with ensemble architecture where multiple agents each good at a particular thing collaborate to achieve goals far superior to what human can, this is what we mean by super-intelligence. Freeciv being a video game operates in discrete spaces. This is one of the reasons for choosing it, it will be one of the most challenging learning environments. Though there is still a possibility of using continuous actions to be taken in this. More details on this later!
2. Game Structure
Saying freeciv is vast is an understatement. There are so many things you can do that it’s hard to remember them all, also the action taken at any given moment can affect the results at later stage in the game.
The game at turn 314 is so advanced, though the game in ‘default’ mode can run to 5000 turns. The small circles at the bottom show the actions that can be takes for any unit. 12 actions can be taken for this particular unit, 1 less than the Atari games! This is an amazing example of the vastness of this game.
A sample tech-tree in freeciv. As you can see in the right, to get Electricity, you need to have Metallurgy and Magnetism. This complex intermixing of possibilities make life tricky for our small agent.
A sample city, more details about the cities here
2. Game Structure
Freeciv can be played be large number of players, upto 126 in freeciv-desktop and upto 500 in freeciv-web to be specific. There are rules according to which the game is to be played, these are called rulesets. In the classic/default ruleset there are three ways to win:
Due to the open source nature of project the rulesets can be modified to the researchers needs. We intend to make doing this a breeze so researchers can spend most of their time developing their models and don’t have to worry about boring stuff. This also allows for extreme customisation that can make this environment even better.
Look at the minimap at bottom left, the opportunity to see how various AIs will compete with each other is one thing that really excites me about this!
*.fcfg
. This
kind of collaboration can yield great results in ensemble AI systems, where many small AI systems combine to make the
whole system work.
With the large number of players that can play this game there is a opportunity to study how collaborative systems would work. With recent developments in the area of competitive self-play and collaborative-play, it will be interesting to see how world will pan out when large number of AIs are left alone in an earth-like world. Maybe we will understand how smart intelligence will emerge out of this mess.
Cheers!