Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all changes #1009

Closed
wants to merge 1 commit into from
Closed

Conversation

MariosZoulias
Copy link
Contributor

#379
Stein and Rapoport strategy to be implemented into axelrod_first
Please tell me if its everything ok with these 3 files and if so what i have to do in order to fix the test problem ;)

Thanks a lot

Copy link
Member

@drvinceknight drvinceknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have deleted quite a few lines by mistake. I expect this is cause by some git confusion. It might be easier for us to talk on gitter so I can walk you through this.

@@ -16,7 +16,6 @@
AntiCycler, Cycler, CyclerCCD, CyclerCCCD, CyclerCCCCCD,
CyclerDC, CyclerDDC, CyclerCCCDCD)
from .darwin import Darwin
from .dbs import DBS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have deleted lines of code that are not part of your PR.

@@ -64,7 +63,7 @@
from .qlearner import (
RiskyQLearner, ArrogantQLearner, HesitantQLearner, CautiousQLearner)
from .rand import Random
from .resurrection import Resurrection, DoubleResurrection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More lines have been deleted.

from .verybad import VeryBad
from .worse_and_worse import (WorseAndWorse, KnowledgeableWorseAndWorse,
WorseAndWorse2, WorseAndWorse3)

from .axelrod_first import SteinAndRapoport
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just be put in the earlier line where we have multiple strategies with from .axelrod_first ...

# Note: Meta* strategies are handled in .__init__.py

all_strategies = [
Adaptive,
AdaptiveTitForTat,
Aggravater,
Alexei,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More things being deleted.

times15_in_list = (round_number // 15) * 15
# lets suppose we are in 28th round
# So we still play according to chi-squared test in the 15th round
all_c = 0 # Each time we consider the whole history
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this, you can just use opponent.cooperations and opponent.defections, so your test would just be chisquare([opponent.cooperations, opponent.defections]), you only need to do that every fifteen moves though so something like:

if len(self.history) % 15 == 0:
    chisquare(...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get the PR and the commits aligned first before we worry about this though.

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