From 1cd199cb3c2d634f1f510830e877d32bd4e3f8f2 Mon Sep 17 00:00:00 2001 From: lili Date: Fri, 19 Jun 2026 10:22:45 -0700 Subject: [PATCH] =?UTF-8?q?feat(saa):=20U5=20M3-only=20override(bake-off)+?= =?UTF-8?q?=2010=20=E5=93=81=E7=B1=BB=E5=A4=9A=E6=A0=B7=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan A U5「只用 M3」(创始人 2026-06-19;deepseek 留作最终模型对照): - SaaStudioGraph.Models.allSame(model): 全 11 角色统一模型工厂(bake-off 用) - SaaGraphDispatcher: saaForceModel 非空→Models.allSame(全角色统一、无跨家回退)+ 单模型路日志;空→stage1 默认(deepseek 主力,字节零变) - AigcExecutorProperties.saaForceModel(默认空=字节零变) - SaaFullGraphE2eTest: -Dsaa.e2e.model flag(全角色统一模型)+ [config] 打印 - saa-e2e-briefs-diverse10.txt: 10 个不同玩法品类(覆盖 U4 全 8 driver 家族 a-h),优于按行序前 10(仅 4 品类聚集) 验证:编译绿(test-compile exit 0)。默认 saaForceModel 空→stage1(deepseek)字节零变,仅 dispatcher=saa 生效。 实测对照(K=10/diverse-10/anthropic):deepseek 主力基线 3/10(30%,主因生成 llm_error,到门者败于 F_wiring/G_input/E_live/H_progress);M3-only 基线量测中。 不碰 gd-runtime/build-from-source(Plan B 域)。 Co-Authored-By: Claude Opus 4.8 --- .../game/module/aigc/saa/SaaGraphDispatcher.java | 11 ++++++++++- .../game/module/aigc/saa/SaaStudioGraph.java | 9 +++++++++ .../service/executor/AigcExecutorProperties.java | 8 ++++++++ .../game/module/aigc/saa/SaaFullGraphE2eTest.java | 5 ++++- .../test/resources/saa-e2e-briefs-diverse10.txt | 15 +++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 game-cloud/game-module-aigc/game-module-aigc-server/src/test/resources/saa-e2e-briefs-diverse10.txt diff --git a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaGraphDispatcher.java b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaGraphDispatcher.java index 311fa5f2..060c9153 100644 --- a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaGraphDispatcher.java +++ b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaGraphDispatcher.java @@ -396,9 +396,18 @@ public class SaaGraphDispatcher implements GenerationDispatcher { mf = SaaStudioGraph.openAiFactory(api); upstreamDesc = "openai(" + baseUrl + ")"; } + // Plan A U5「只用 M3」(创始人 2026-06-19):saaForceModel 非空 → 全角色统一该模型(含 stage2/fallback 位,单模型无跨家回退);空=stage1 默认(deepseek 主力,字节零变)。 + String forceModel = properties.getSaaForceModel(); + boolean singleModel = forceModel != null && !forceModel.isBlank(); + SaaStudioGraph.Models models = singleModel + ? SaaStudioGraph.Models.allSame(forceModel.trim()) + : SaaStudioGraph.Models.stage1(); + if (singleModel) { + log.info("[saa-dispatch] 单模型路(U5 只用 M3):forceModel={}(全 11 角色统一、无跨家回退)", forceModel.trim()); + } // 固定架构 B2:透传救场阶梯 stage2 额外救场轮(saaStage2ExtraRepairs),走 factory-based build 重载(recursionLimit 按 5+3 重算)。 // Plan A/U2:historyEnabled=anthropic——anthropic 路 generate 跨轮保留 thinking 历史 + 连续对话救场;openai 路关(字节零变)。 - compiledGraph = SaaStudioGraph.build(mf, SaaStudioGraph.Models.stage1(), gameRuntimeRoot, + compiledGraph = SaaStudioGraph.build(mf, models, gameRuntimeRoot, properties.getSaaMaxRepairs(), properties.getSaaMaxPlayerRounds(), properties.getSaaStage2ExtraRepairs(), properties.getSaaSourceMode(), // plan U3:factory(默认,iife) | gamedef(真结构化源) diff --git a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaStudioGraph.java b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaStudioGraph.java index d6233343..d5aefb22 100644 --- a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaStudioGraph.java +++ b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/saa/SaaStudioGraph.java @@ -129,6 +129,15 @@ public final class SaaStudioGraph { return new Models(M_DESIGN, M_CODE, M_FIX, M_PLAYER_TEXT, M_PLAYER_VISION, M_CLASSIFY, M_NARRATIVE, M_CODE_STAGE2, M_FIX_STAGE2, M_CODE_FALLBACK, M_FIX_FALLBACK); } + + /** + * 全角色统一同一模型(Plan A U5「只用 M3」创始人 2026-06-19;bake-off / 单模型基线用)。 + * 11 个角色名全置为 {@code model}(含 stage2 强档位与 code/fix fallback 位 → 单模型路无跨家回退,符合"只用 M3"语义); + * per-role maxTokens/temperature 不变(在 assemble 设),故小位(如 playerVision=900)仍按其预算、thinking 预算 clamp 后自动降级。 + */ + public static Models allSame(String model) { + return new Models(model, model, model, model, model, model, model, model, model, model, model); + } } /** diff --git a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/service/executor/AigcExecutorProperties.java b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/service/executor/AigcExecutorProperties.java index fcdda4d1..1a656324 100644 --- a/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/service/executor/AigcExecutorProperties.java +++ b/game-cloud/game-module-aigc/game-module-aigc-server/src/main/java/com/wanxiang/huijing/game/module/aigc/service/executor/AigcExecutorProperties.java @@ -222,6 +222,14 @@ public class AigcExecutorProperties { */ private Integer saaCdpPortBase = 9222; + /** + * SAA 全角色强制统一模型(Plan A U5「只用 M3」,创始人 2026-06-19;bake-off / 单模型基线用): + * 非空 → SAA 图 11 个角色名全置为此模型(含 stage2 强档位与 code/fix fallback 位 → 单模型路无跨家回退); + * 空(默认)= stage1 默认路由(deepseek 主力 + M3 视觉/分类/回退),字节零变。per-role maxTokens/temperature 不变。 + *

仅 dispatcher=saa 生效。量 M3-only 基线设 {@code MiniMax-M3};deepseek 对照留空(默认)即 deepseek 主力路。 + */ + private String saaForceModel; + // ===== SAA 模型协议(Plan A · U1「用对 M3」;flag 旁挂,默认 openai 字节零变)===== /** diff --git a/game-cloud/game-module-aigc/game-module-aigc-server/src/test/java/com/wanxiang/huijing/game/module/aigc/saa/SaaFullGraphE2eTest.java b/game-cloud/game-module-aigc/game-module-aigc-server/src/test/java/com/wanxiang/huijing/game/module/aigc/saa/SaaFullGraphE2eTest.java index fc4e0803..f621142f 100644 --- a/game-cloud/game-module-aigc/game-module-aigc-server/src/test/java/com/wanxiang/huijing/game/module/aigc/saa/SaaFullGraphE2eTest.java +++ b/game-cloud/game-module-aigc/game-module-aigc-server/src/test/java/com/wanxiang/huijing/game/module/aigc/saa/SaaFullGraphE2eTest.java @@ -220,6 +220,8 @@ class SaaFullGraphE2eTest { // SAA 模型协议(Plan A U1「用对 M3」;本 flag = P1-6「flip 须同切协议」的量测面孪生):-Dsaa.e2e.protocol 默认 openai(字节零变基线); // 量 anthropic 真基线(R1 硬要求 量==发、在用协议=anthropic)须显式 -Dsaa.e2e.protocol=anthropic;base/thinkingBudget 走 props 默认。 String protocol = System.getProperty("saa.e2e.protocol", "openai").trim(); + // 强制单模型(Plan A U5「只用 M3」,创始人 2026-06-19):-Dsaa.e2e.model 非空 → 全角色统一该模型(如 MiniMax-M3);未设=stage1 默认(deepseek 主力)。 + String forceModel = System.getProperty("saa.e2e.model", "").trim(); // 端口基址(Plan A U3 暴露;与 superpowers-chrome 等本机进程共存防撞):未设=props 默认 4320/9222(字节零变)。 // 本机 9222 常被 superpowers-chrome 占用 → 量测可 -Dsaa.e2e.cdpPortBase=9322 避撞(serve-and-play 净场只杀本槽端口,不误杀他者)。 Integer playPortBase = Integer.getInteger("saa.e2e.playPortBase"); @@ -239,9 +241,10 @@ class SaaFullGraphE2eTest { props.setSaaSourceMode(sourceMode); // 003-U1 发现②:量对路(gamedef 基线须显式 -Dsaa.e2e.sourceMode=gamedef) props.setSaaConcurrency(concurrency); // 003-U1:后台并发度(默认 1=串行基线;>1 多 job 并行真玩各占错开端口) props.setSaaModelProtocol(protocol); // Plan A U1:anthropic=用对 M3 真路(R1 量==发);默认 openai 字节零变。base/budget 走 props 默认(saaAnthropicBase / saaThinkingBudget) + if (!forceModel.isEmpty()) props.setSaaForceModel(forceModel); // Plan A U5:全角色统一模型(如 MiniMax-M3);未设=stage1 默认(deepseek 主力) if (playPortBase != null) props.setSaaPlayPortBase(playPortBase); // 未设=props 默认 4320(字节零变) if (cdpPortBase != null) props.setSaaCdpPortBase(cdpPortBase); // 未设=props 默认 9222;本机避 superpowers-chrome 可 -Dsaa.e2e.cdpPortBase=9322 - System.out.println("[config] sourceMode=" + sourceMode + "(factory=iife旧路/gamedef=真结构化), concurrency=" + concurrency + ", protocol=" + protocol + ", playPortBase=" + props.getSaaPlayPortBase() + ", cdpPortBase=" + props.getSaaCdpPortBase()); + System.out.println("[config] sourceMode=" + sourceMode + "(factory=iife旧路/gamedef=真结构化), concurrency=" + concurrency + ", protocol=" + protocol + ", forceModel=" + (forceModel.isEmpty() ? "(stage1默认/deepseek主力)" : forceModel) + ", playPortBase=" + props.getSaaPlayPortBase() + ", cdpPortBase=" + props.getSaaCdpPortBase()); // ── 2) 结果容器 + stub 回调(共享 latch(N) + byTrace 精确归位)+ 派发器(5 参,sourceProjectApi=null=create 路)── long runStart = System.currentTimeMillis(); diff --git a/game-cloud/game-module-aigc/game-module-aigc-server/src/test/resources/saa-e2e-briefs-diverse10.txt b/game-cloud/game-module-aigc/game-module-aigc-server/src/test/resources/saa-e2e-briefs-diverse10.txt new file mode 100644 index 00000000..d3d58890 --- /dev/null +++ b/game-cloud/game-module-aigc/game-module-aigc-server/src/test/resources/saa-e2e-briefs-diverse10.txt @@ -0,0 +1,15 @@ +# saa-e2e-briefs-diverse10.txt —— 003-U1/U5 验证集:10 个不同玩法品类(创始人 2026-06-19 指令) +# 用法:-Dsaa.e2e.sourceMode=gamedef -Dsaa.e2e.briefFile=src/test/resources/saa-e2e-briefs-diverse10.txt -Dsaa.e2e.n=10 +# 选品原则:一品类一条、覆盖 U4 全部 8 个 driver 家族(a-h),避免单品类偶过/偶不过;优于按行序取前 10(前 10 仅 4 品类聚集)。 +# 行式:去首尾空白、跳空行与本行式 # 注释(SaaFullGraphE2eTest.parseBriefLines)。 +# +打砖块:挡板接球把上方砖块全部消除即胜,掉球则负。 +贪吃蛇:操控小蛇吃食物变长,撞到自己身体或墙壁则游戏结束。 +小恐龙跑酷:按键让恐龙跳过仙人掌和飞鸟,撞到障碍即结束,跑得越远分越高。 +点击消除:点击三个或以上相连的同色方块把它们消掉,消满目标分数过关。 +太空射击:飞船左右移动并发射子弹击落持续下降的敌机,被敌机撞到则失败。 +打地鼠:地鼠随机从洞口冒头,点击敲中得分,限时结束时分数越高越好。 +钢琴块:只点黑色方块别碰白块,节奏越来越快,点错或漏点即结束。 +像素鸟穿管:点击让小鸟扇翅上升,穿过一根根上下水管的缝隙,撞管或落地即结束。 +愤怒投石:拖拽瞄准弹射石块,砸倒所有目标木箱即通关,弹药用尽未清场则失败。 +太空躲陨石:上下左右移动飞船躲避飞来的陨石,坚持到计时归零即通关。