Montag, 29. März 2010

And the winner is ...

We had 9 agents in this first tournament, each participated to 4 games. A game took 30 min or 360 time units.

Fire Lion won 2 games and was placed second in the other two games. He clearly gains the lead! Congratulations!
See the entire ranking list here.

Here the setup parameters for the tournament:
module Greenfields

  class Agency < Tournament::Agency
    level 'Greenfields'
    agents_per_game 12
    games_per_agent 4
    game_duration 1800 # sec
    time_unit 5.0  # sec
    build_options 'Greenfields::World' => { :size => 5 },
                  'Greenfields::Resource' => { :size => 4000..16000 },
                  'Greenfields::Population' => { :size => 40..160 }
  end

end
The resources and the populations had the following properties:
resource :capacity => 100000, :birth_rate => 0.15, :death_rate => 0.05
population :birth_rate => 0.2, :death_rate => 0.05, :hunting_rate => 0.05, :needed_food => 2.0

What are your observations for this first tournament?

Samstag, 27. März 2010

First Tournament

The frist agents have gathered for the first tournament. And we are curious to see the very first winner on:


29. March 2010



See it on Zero X.

Donnerstag, 25. März 2010

Free Actions

Release 0.9.5 introduces two new actions. Both are free, means, they don't take any actions costs.

First with info you can now store messages during your agents think method. Later you can analyse them in the reports of the game reviews. All messages saved this way are private. Only the owner of the agent can see them.
info 'my secret debug info'
Second is time. Time simply returns the time units elapsed since the game has been started.
time # => time_units in floats
This is the last release before the first tournament will take place.

The documentation and the SDK have been updated.

Montag, 15. März 2010

Release 0.9.4

I updated Zero X to the current version 0.9.4. This release fixes some bugs and adds some new features. Most of them are all behind the scenes, but some of them you might will note.
The Agent SDK has been revised, as the fixture generator did not create the data, we would expect from the view. This issue has been fixed now, fixtures and view, get by a look_around, are now the same.
In the report active and passive attacks are now distinct by two different colors. When an agent attacked another, the event is marked yellow, while when he was attacked it is marked red. Also you now see a push event, as a consequence of an attack, which tells you where the agent was pushed.

Download the new SDK V.0.9.4

Montag, 8. März 2010

Don't Move

In certain situations it's the best action for an agent to take no action. Don't move just stay where you are.
And sometimes it comes handy when an agent can even move to nil, which has exactly that effect no movement.
move_to nil
move_to 0,0
But until now move_to costed in any case action costs and saved move reports. Now we changed that behavior if nil is passed. It will now take no action costs and will not save a move report anymore.

Update
move_to 0,0 also takes no action costs or saves reports.

Tungmar submitted a patch to check, if your agent has moved or not. In your tests you can now use:
@agent.think
@agent.should_not have_moved

The Documentation has been updated and a new SDK (0.9.3) is available.

Montag, 1. März 2010

Releasing Zero X

I'm pleased to announce, that I released the beta version of Zero X yesterday.
Zero X is a programming game, that let's you create an agent program, that will then compete with others agents in different tournaments.
The first test tournament will take place this month, the exact date will be announced in this blog.

If you are interested in artificial intelligence, artificial life, robotics or cybernetic systems then check it out!

www.zero-x.net


Freitag, 26. Februar 2010

How to initialize your agent

Since last week the first beta testers could access the stage environment of Zero X. I received some first feedbacks and could already fullfill one of the wishes.

In order to have a proper place to initialize the agent, a first callback method has been introduced. Right after the agent has been started after_start is called once.
module Demo

  class Example < Tournament::Agent

    def after_start
      # initialize
    end

    def think
     # called periodically
    end

  end

end
after_start is called just after the thread for the agent has been forked and one step before the think loop. Here's a simplificated code snippet from the game class, to see how it's implemented:
Thread.fork do
   agent.after_start
   begin
      agent.think
   end until stopped?
end
In your test cases the agent should now be created again before each test, as create_agent also calls after_start.
before :all do
  load_field_fixtures 'greenfields'
end
  
before :each do
  @agent = create_agent Demo::TheGood
end
There's also a test helper method create_agent_without_start, if you need to set test expectations before calling after_start.

Thanks to Tungmar for his feedback!