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

Improve action sequence evaluation #4

Open
apmnt opened this issue Nov 30, 2024 · 1 comment
Open

Improve action sequence evaluation #4

apmnt opened this issue Nov 30, 2024 · 1 comment

Comments

@apmnt
Copy link
Owner

apmnt commented Nov 30, 2024

Currently the evaluation function looks like this:

    @staticmethod
    def evaluate_player(player: "Player") -> int:
        points = 0
        points += player.points * 25
        points += Player.get_damage_dealt_to_cards(player.opponent) * 0.1
        points += Player.get_number_of_evolved_cards(player) * 5
        return points

    @staticmethod
    def get_damage_dealt_to_cards(player: "Player") -> int:
        damage_dealt = 0
        for card in player.bench + [player.active_card]:
            damage_dealt += card.max_hp - card.hp
        return damage_dealt

    @staticmethod
    def get_number_of_evolved_cards(player: "Player") -> int:
        evolved_cards = 0
        for card in player.bench + [player.active_card]:
            card: Card
            if not card.is_basic:
                evolved_cards += 1
        return evolved_cards
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

No branches or pull requests

2 participants
@apmnt and others