class ActiveGenie::Battle::Basic

def initialize(player_1, player_2, criteria, config: {})

Returns:
  • (String) - :what_could_be_changed_to_avoid_draw A suggestion on how to avoid a draw
  • (String) - :reasoning Detailed explanation of why the winner was chosen
  • (String) - :winner The winner, either player_1 or player_2
  • (Hash) - The evaluation result containing the winner and reasoning

Parameters:
  • config (Hash) -- Additional configuration options that modify the battle evaluation behavior
  • criteria (String) -- The evaluation criteria or rules to assess against
  • player_2 (String) -- The content or submission from the second player
  • player_1 (String) -- The content or submission from the first player
def initialize(player_1, player_2, criteria, config: {})
  @player_1 = player_1
  @player_2 = player_2
  @criteria = criteria
  @config = ActiveGenie::Configuration.to_h(config)
end