Repository navigation
v1.0.45
変更内容
1.0.42〜1.0.45 の変更をまとめています。どれも AI からのアプリ操作(z2-ui)を速くするためのものです。
- 画面の色が条件を満たすまで、画像なしで待てるようになりました(1.0.43)。
z2-ui colors … --until 条件で、z2term の中で約 1/3 秒ごとに確かめ、満たした瞬間の色を文字で返します。- 条件は
brighter N/darker N(明るさの平均)、changed(どこかの色が変わった)、色の名前(すべての点がその色)です。 - 例: 「盤面が明るくなるまで(操作できる番になるまで)」「ランプが緑になるまで」。
- これまで AI は、撮った画像を読んで「まだ待つ」と決めるのを繰り返していて、1 回に 5〜10 秒かかっていました。
- 条件は
- 「動きが止まったか」の判定を直しました(1.0.42)。 画面の一部だけが動いている最中(数個の駒が消える・小さなダイアログなど)を「止まった」として早く返してしまうことがありました。
--boxを付けたときは、その範囲の中の動きだけを見ます。- 一部がずっと動いている画面で毎回最大まで待たされるときは、AI 操作の設定の「小さな動きも「動いている」とみる」を OFF にすると、前の判定に戻ります(1.0.44)。AI も呼び出しごとに
--settle-check strict|looseで選べます。
- 一部がずっと動いている画面で毎回最大まで待たされるときは、AI 操作の設定の「小さな動きも「動いている」とみる」を OFF にすると、前の判定に戻ります(1.0.44)。AI も呼び出しごとに
- 呼び出しの回数を減らす指定を足しました(1.0.42)。
shot/--shotに--gridを付けると、画像と色の格子を 1 回で返します。--expect-changeで、反応が遅い画面でも、変わるのを待ってから止まるのを待ちます。seqの途中の手でも--peek(指を置いたままの画面)を使えます。drag --hold MSで、動き出す前に始点で指を止められます。触れてすぐ動くと認めない画面で、なぞる速さを上げられます。
- AI 用ガイドに「繰り返しは手元のスクリプトに任せる」使い方を書き足しました(1.0.45)。 同じ手順が繰り返すときは、z2-ui を呼ぶ小さなスクリプトに任せ、知らない状態になったときだけ AI が判断します。許可・一時停止・停止はスクリプトにも今までどおり効きます。
Changes
This release collects the changes from 1.0.42 to 1.0.45, all of them to make AI app control (z2-ui) faster.
- Waiting until the screen's colours meet a condition, without any image (1.0.43).
z2-ui colors ... --until CONDchecks inside z2term about every third of a second and returns the colours as text the moment the condition holds.- Conditions:
brighter N/darker N(mean brightness),changed(any colour changed) or a colour name (every point has it). - For example "until the board brightens (it is my turn)" or "until the lamp is green".
- Before, the AI kept capturing, reading the image and deciding to wait again, at 5–10 s per round.
- Conditions:
- A better "has it stopped moving" check (1.0.42). A screen where only a part was still moving (a few pieces disappearing, a small dialog) could be reported as stopped too early. With
--box, only movement inside the box counts.- If a screen with a part that never stops now waits up to the limit every time, turn off "Catch small moving parts" in the AI operation settings to get the previous check (1.0.44). The AI can also choose per call with
--settle-check strict|loose.
- If a screen with a part that never stops now waits up to the limit every time, turn off "Catch small moving parts" in the AI operation settings to get the previous check (1.0.44). The AI can also choose per call with
- Fewer calls (1.0.42).
--gridonshot/--shotreturns the image and a colour grid in one call.--expect-changewaits for a late-reacting screen to change before waiting for it to stop.--peek(the screen while the finger is down) may be used in any one step of aseq.drag --hold MSkeeps the finger on the start point before moving, so screens that ignore an immediate move can be dragged faster.
- The AI guide now describes handing repeated loops to a local script (1.0.45). When the same procedure repeats, a small script that calls z2-ui runs it, and the AI decides only when the script meets something unknown. Permissions, pause and stop still apply to the script.
Full Changelog: v1.0.41...v1.0.45