Agent_17

Bulldog

  • 6.0average EPS
  • 6.0last EPS
Total Ranking
Ranking 7
Tournaments
Tournament 17
Level
Greenfields
Greenfields

Tournaments

Tournament

Date: 26 Oct. 2012

  • 18agents
  • 5games
Winner
Agent_14 7.8
Agent
Agent_17 6.0
Tournament Rank
Ranking 2
Tournament

Date: 20 Sep. 2012

  • 19agents
  • 5games
Winner
Agent_14 6.8
Agent
Agent_17 6.8
Tournament Rank
Ranking 2
Tournament

Date: 5 Aug. 2012

  • 19agents
  • 5games
Winner
Agent_17 7.2
Agent
Agent_17 7.2
Tournament Rank
Ranking 1
Tournament

Date: 22 Jul. 2012

  • 19agents
  • 5games
Winner
Agent_18 8.6
Agent
Agent_17 5.6
Tournament Rank
Ranking 2
Tournament

Date: 3 Sep. 2011

  • 19agents
  • 5games
Winner
Agent_16 8.2
Agent
Agent_17 4.6
Tournament Rank
Ranking 6
Tournament

Date: 6 Aug. 2011

  • 19agents
  • 5games
Winner
Agent_16 7.2
Agent
Agent_17 6.4
Tournament Rank
Ranking 3
Tournament

Date: 25 Jun. 2011

  • 19agents
  • 5games
Winner
Agent_17 6.6
Agent
Agent_17 6.6
Tournament Rank
Ranking 1
Tournament

Date: 30 Apr. 2011

  • 19agents
  • 5games
Winner
Agent_14 6.4
Agent
Agent_17 5.8
Tournament Rank
Ranking 3
Tournament

Date: 26 Mar. 2011

  • 19agents
  • 5games
Winner
Agent_13 8.0
Agent
Agent_17 5.8
Tournament Rank
Ranking 4
Tournament

Date: 26 Feb. 2011

  • 19agents
  • 5games
Winner
Agent_13 8.0
Agent
Agent_17 5.2
Tournament Rank
Ranking 4
Tournament

Date: 5 Feb. 2011

  • 19agents
  • 5games
Winner
Agent_17 6.6
Agent
Agent_17 6.6
Tournament Rank
Ranking 1
Tournament

Date: 8 Jan. 2011

  • 19agents
  • 5games
Winner
Agent_13 7.4
Agent
Agent_17 6.2
Tournament Rank
Ranking 3
Tournament

Date: 18 Dec. 2010

  • 19agents
  • 5games
Winner
Agent_18 8.8
Agent
Agent_17 8.8
Tournament Rank
Ranking 2
Tournament

Date: 4 Dec. 2010

  • 19agents
  • 5games
Winner
Agent_14 7.4
Agent
Agent_17 4.8
Tournament Rank
Ranking 6
Tournament

Date: 2 Aug. 2010

  • 19agents
  • 5games
Winner
Agent_17 6.8
Agent
Agent_17 6.8
Tournament Rank
Ranking 1
Tournament

Date: 19 Jul. 2010

  • 19agents
  • 5games
Winner
Agent_17 7.8
Agent
Agent_17 7.8
Tournament Rank
Ranking 1
Tournament

Date: 5 Jul. 2010

  • 17agents
  • 5games
Winner
Agent_16 10.0
Agent
Agent_17 2.4
Tournament Rank
Ranking 9

Source

Licence
Source Code
module ScorpionKing
  
  class Bulldog < Tournament::Agent
    
    attr_accessor :enemies, :prey
    
    def after_start
      @enemies = []
      @enemy_size = 2.0/3.0
    end
    
    def think
      been_attacked?
      @view = look_around
      move_to hunted_prey || found_enemy || best_resource
    end
    
    # goes the the biggest free resource
    def best_resource
      @view.select{|f| f.has_no_population? or myfield?(f) }.max_by{|f| f.resource}
    end
    
    def found_enemy
      if found_on_field = @view.select do |f| 
          f.has_population? && @enemies.include?(f.agent) && size * @enemy_size > f.population
        end.min_by do |f| 
          f.population
        end
        @prey = found_on_field.agent
        info "found enemy #{@prey}, hunt begins"
        found_on_field
      end
    end
    
    def hunted_prey
      if @prey
        if hunted_prey = @view.find do|f| 
          f.has_population? && f.agent == @prey && size * @enemy_size > f.population
          end
          info "hunting down #{hunted_prey.agent}"
          hunted_prey
        else
          info "prey #{prey} lost"
          nil
        end
      end
    end
    
    def been_attacked?
      each_event do |event|
        if event.instance_of? AttackedEvent
          unless @enemies.include? event.attacker
            @enemies << event.attacker
            info "keep in mind enemy #{event.attacker}"
          end
        end
      end
    end
    
    def myfield? field
      field.x == 0 && field.y == 0
    end
    
  end
  
end

Administrator

Change Agent State

on state accepted
Back to agent list