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
  1. module ScorpionKing  
  2.     
  3.   class Bulldog < Tournament::Agent  
  4.       
  5.     attr_accessor :enemies:prey  
  6.       
  7.     def after_start  
  8.       @enemies = []  
  9.       @enemy_size = 2.0/3.0  
  10.     end  
  11.       
  12.     def think  
  13.       been_attacked?  
  14.       @view = look_around  
  15.       move_to hunted_prey || found_enemy || best_resource  
  16.     end  
  17.       
  18.     # goes the the biggest free resource  
  19.     def best_resource  
  20.       @view.select{|f| f.has_no_population? or myfield?(f) }.max_by{|f| f.resource}  
  21.     end  
  22.       
  23.     def found_enemy  
  24.       if found_on_field = @view.select do |f|   
  25.           f.has_population? && @enemies.include?(f.agent) && size * @enemy_size > f.population  
  26.         end.min_by do |f|   
  27.           f.population  
  28.         end  
  29.         @prey = found_on_field.agent  
  30.         info "found enemy #{@prey}, hunt begins"  
  31.         found_on_field  
  32.       end  
  33.     end  
  34.       
  35.     def hunted_prey  
  36.       if @prey  
  37.         if hunted_prey = @view.find do|f|   
  38.           f.has_population? && f.agent == @prey && size * @enemy_size > f.population  
  39.           end  
  40.           info "hunting down #{hunted_prey.agent}"  
  41.           hunted_prey  
  42.         else  
  43.           info "prey #{prey} lost"  
  44.           nil  
  45.         end  
  46.       end  
  47.     end  
  48.       
  49.     def been_attacked?  
  50.       each_event do |event|  
  51.         if event.instance_of? AttackedEvent  
  52.           unless @enemies.include? event.attacker  
  53.             @enemies << event.attacker  
  54.             info "keep in mind enemy #{event.attacker}"  
  55.           end  
  56.         end  
  57.       end  
  58.     end  
  59.       
  60.     def myfield? field  
  61.       field.x == 0 && field.y == 0  
  62.     end  
  63.       
  64.   end  
  65.     
  66. end  

Administrator

Change Agent State

on state accepted
Back to agent list