Sha256: 6b1c7fbf8e45a6813475ffa0c8223de756be055e363dcfc5218b83707a738e25

Contents?: true

Size: 611 Bytes

Versions: 8

Compression:

Stored size: 611 Bytes

Contents

# frozen-string-literal: true

module Bioshogi
  module AI
    module Evaluator
      # 評価すること
      # ・盤上の駒の価値
      # ・詰将棋モードの場合はYの位置を考慮したら逆に面倒なことになるのでこの評価方法でよい
      class Level1 < Base
        private

        def total_score(player)
          w = 0
          w += player.piece_box.score
          w += player.soldiers.sum { |e| soldier_score(e) }
          w
        end

        # 自分基準評価値
        def soldier_score(e)
          e.abs_weight
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bioshogi-0.0.15 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.14 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.10 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.9 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.8 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.7 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.5 lib/bioshogi/ai/evaluator/level1.rb
bioshogi-0.0.4 lib/bioshogi/ai/evaluator/level1.rb