Skip to content

Commit

Permalink
improve plot
Browse files Browse the repository at this point in the history
  • Loading branch information
TammyQAQ committed Feb 6, 2025
1 parent 1e2e289 commit 0a31787
Show file tree
Hide file tree
Showing 5 changed files with 4,467 additions and 44,115 deletions.
8 changes: 5 additions & 3 deletions blockchain_env/bidding.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
BLOCK_CAP = 100
MAX_ROUNDS = 24
BUILDER_COUNT = 20
BLOCK_NUM = 100
BLOCK_NUM = 10

random.seed(16)

Expand Down Expand Up @@ -187,8 +187,10 @@ def save_results(block_data, num_attack_builders):
if __name__ == "__main__":
for num_attack_builders in [10]:
builders = (
[ModifiedBuilder(f"builder_{i}", is_attacker=True, strategy="late_enter") for i in range(5)] +
[ModifiedBuilder(f"builder_{i+10}", is_attacker=True, strategy="reactive") for i in range(15)]
[ModifiedBuilder(f"builder_{i}", is_attacker=True, strategy="late_enter") for i in range(3)] +
[ModifiedBuilder(f"builder_{i+3}", is_attacker=False, strategy="late_enter") for i in range(2)] +
[ModifiedBuilder(f"builder_{i+5}", is_attacker=True, strategy="reactive") for i in range(10)] +
[ModifiedBuilder(f"builder_{i+15}", is_attacker=False, strategy="reactive") for i in range(5)]
)
users = [User(f"user_{i}", False, builders) for i in range(50)]
block_data = simulate_auction(builders, users, BLOCK_NUM)
Expand Down
Loading

0 comments on commit 0a31787

Please sign in to comment.