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

Seed argument also trigger players swap #42

Open
royerk opened this issue Feb 3, 2023 · 1 comment
Open

Seed argument also trigger players swap #42

royerk opened this issue Feb 3, 2023 · 1 comment

Comments

@royerk
Copy link

royerk commented Feb 3, 2023

Hello, weird double number of games when setting the initial seed.

Steps to reproduce:

  • build current brutaltester
  • build cg_fall_2002 referee linked in the readme
  • This runs 1 game: java -jar brutal.jar -r "java -jar -Dleague.level=2 cg_fall_2022.jar" -p1 "python3 do_nothing_bot.py" -p2 "python3 do_nothing_bot.py" -n 1 -t 1
  • This runs 2 games: java -jar brutal.jar -r "java -jar -Dleague.level=2 cg_fall_2022.jar" -p1 "python3 do_nothing_bot.py" -p2 "python3 do_nothing_bot.py" -n 1 -t 1 -i 0

The do_nothing_bot.py:

width, height = [int(i) for i in input().split()]

while True:
    my_matter, opp_matter = [int(i) for i in input().split()]
    for row in range(height):
        for col in range(width):
            (
                scrap_amount,
                owner,
                units,
                recycler,
                can_build,
                can_spawn,
                in_range_of_recycler,
            ) = [int(k) for k in input().split()]

    print("WAIT")

Adding -i 0 to set the seed for consistent testing also double the number of games as if the -s arg was present. This double the testing time for no reason. Failed games, for a timeout, show a command to reproduce the failed game that contains -s in it (don't know if that helps).

Cheers

@marktellez
Copy link

Si así

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