-
Notifications
You must be signed in to change notification settings - Fork 0
Experiments H1 & H2 #13
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4584e43
Dodane generatory plików konfiguracyjnych
p10tr13 2190bc8
Dodane generatory wykresów oraz same wykresy
p10tr13 96b1784
Kolejne obrazki dodane do raportu
p10tr13 f4bc90b
Dodana analiza hipotez h3 i h4 w raporcie
p10tr13 c26a766
Nowszy pdf
p10tr13 160fa50
Dodany tryb testujący agentów przeciwko człowiekowi
p10tr13 024ed70
Dodana sekcja człowiek vs AI w raporcie
p10tr13 a0295c2
Finalny raport
p10tr13 89bda65
Zaktualizowane wykresy i kod
p10tr13 517c30c
Zmieniony raport
p10tr13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
adamgracikowski marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
adamgracikowski marked this conversation as resolved.
|
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| *.jsonl | ||
| *.toml | ||
| *.png | ||
| *.txt | ||
| *.txt | ||
| *.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| import shutil | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| BOARD_SIZES = [(7, 7), (8, 8), (6, 8), (8, 6)] | ||
| MCTS_ITERATIONS = 10000 | ||
| EXPLORATION_CONSTANT = 1.41 | ||
| RAVE_K_VALUE = 100 | ||
|
|
||
|
|
||
| def format_agent(config: dict) -> str: | ||
| lines = [] | ||
| for key, value in config.items(): | ||
| if isinstance(value, str): | ||
| lines.append(f'{key} = "{value}"') | ||
| elif isinstance(value, bool): | ||
| lines.append(f"{key} = {str(value).lower()}") | ||
| else: | ||
| lines.append(f"{key} = {value}") | ||
| return "\n".join(lines) | ||
|
|
||
|
|
||
| def format_config(board_width: int, board_height: int, white: dict, black: dict) -> str: | ||
| return ( | ||
| f"board_width = {board_width}\n" | ||
| f"board_height = {board_height}\n\n" | ||
| "[white_player]\n" | ||
| f"{format_agent(white)}\n\n" | ||
| "[black_player]\n" | ||
| f"{format_agent(black)}\n" | ||
| ) | ||
|
|
||
|
|
||
| def write_config(output_dir: Path, name: str, board_width: int, board_height: int, white: dict, black: dict): | ||
| path = output_dir / f"{name}.toml" | ||
| path.write_text(format_config(board_width, board_height, white, black), encoding="utf-8") | ||
|
|
||
|
|
||
| def generate_configs(output_dir: Path): | ||
| if output_dir.exists(): | ||
| shutil.rmtree(output_dir) | ||
| output_dir.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| uct_agent = { | ||
| "type": "Mcts", | ||
| "max_iterations": MCTS_ITERATIONS, | ||
| "exploration_constant": EXPLORATION_CONSTANT, | ||
| } | ||
| rave_agent = { | ||
| "type": "Mcts", | ||
| "max_iterations": MCTS_ITERATIONS, | ||
| "exploration_constant": EXPLORATION_CONSTANT, | ||
| "use_rave": True, | ||
| "rave_k": RAVE_K_VALUE, | ||
| } | ||
|
|
||
| for width, height in BOARD_SIZES: | ||
| board_name = f"{width}x{height}" | ||
| write_config( | ||
| output_dir, | ||
| f"h1_{board_name}_rave_white_vs_uct_black", | ||
| width, | ||
| height, | ||
| rave_agent, | ||
| uct_agent, | ||
| ) | ||
| write_config( | ||
| output_dir, | ||
| f"h1_{board_name}_uct_white_vs_rave_black", | ||
| width, | ||
| height, | ||
| uct_agent, | ||
| rave_agent, | ||
| ) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| generate_configs(Path(__file__).parent / "configs") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.