Files
gplan-2/game/sim/rhythm_batch.gd
T

38 lines
1.6 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VERTICAL SLICE - NOT FOR PRODUCTION
# 技能池节奏读数批量采集(06 待办「技能池节奏体验验证」机器半边正式读数):
# 60 distinct seeds × 双策略 × 两关,atk/hp 零加成基线——单网格组合避免种子重复
# (4200 系 0/484 假象教训:节奏/EV 读数须 ≥50 distinct seeds,见台账 89)。
# 运行:Godot_console.exe --headless --path . --script res://sim/rhythm_batch.gd -- [seeds] [seed0]
extends SceneTree
func _initialize() -> void:
var args := OS.get_cmdline_user_args()
var n := 60
if args.size() >= 1 and args[0].is_valid_int():
n = int(args[0])
var seed0 := 4400
if args.size() >= 2 and args[1].is_valid_int():
seed0 = int(args[1])
var db = load("res://core/config_db.gd").new()
if not db.load_tables("res://data/tables", false):
print("表加载失败")
quit(1)
return
var logger = load("res://presentation/playtest_logger.gd").new()
logger.ap_per_round = int(db.action_economy.ap_per_round)
var log_path: String = logger.start_session(seed0)
print("节奏批日志: %s" % log_path)
var autoplay = load("res://sim/level_autoplay.gd")
var t0 := Time.get_ticks_msec()
var total := 0
for L in [1, 2]:
for policy in ["normal", "perfect"]:
for i in range(n):
var r = autoplay.run_level(db, seed0 + i, L, 0, 0, false, logger, policy, "min")
total += 1
if i % 10 == 0:
print("进度 L%d %s %d/%d" % [L, policy, i, n])
logger.close_session()
print("节奏批完成:%d 局,耗时 %.1f 秒\n日志: %s" % [total, (Time.get_ticks_msec() - t0) / 1000.0, log_path])
quit(0)