Skip to content

ref: remove opponent policy from strategy evolution#440

Merged
Yagth merged 2 commits into
iCog-Labs-Dev:devfrom
Bereket-Eshete:dev
Apr 29, 2026
Merged

ref: remove opponent policy from strategy evolution#440
Yagth merged 2 commits into
iCog-Labs-Dev:devfrom
Bereket-Eshete:dev

Conversation

@Bereket-Eshete

@Bereket-Eshete Bereket-Eshete commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Description

This PR refactors the strategy evolution process to address a critical limitation in how strategies are currently evaluated and evolved. Previously, the strategy evolution would take one adversary at a time and find strategies optimized to win against that particular opponent. While this approach works in isolated environments where the adversary is known beforehand, it results in strategies that are not versatile enough to perform well against different types of opponents. To address this issue, this PR removes the explicit opponent policy parameter from the strategy evolution process and instead implements game-splitting function which automatically divides the total number of games between two different opponent random player and minimax player. This mixed-opponent evaluation approach ensures that evolved strategies are versatile enough to both beat weaker random opponents while also surviving and drawing stronger minimax opponents. This change makes the strategy scoring process more maintainable while producing more robust and generalizable strategies that can handle diverse opponent types. All related functions have been updated to work with this new parameter structure, and test cases have been adjusted accordingly. I use PeTTa v1.0.0 to test the functionality and highly recommend using this version for testing this new functionality.

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Split game budget between random and minimax opponents internally,
eliminating the need to pass opponent policy as a parameter. This
simplifies the strategy scoring interface and reduces parameter
complexity in different function.
@Bereket-Eshete Bereket-Eshete requested a review from Yagth April 27, 2026 19:53
Comment thread scoring/test/cscore-test.metta
Comment thread optimization/hillclimbing/hill-climbing-helpers.metta Outdated
Comment thread deme/expand-deme.metta Outdated
@Yagth Yagth merged commit f41b9f9 into iCog-Labs-Dev:dev Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants