LF2 Online by Xôi · Windows guideLF2 Online của Xôi · hướng dẫn cho Windows
A mod's own .exe is the original Little Fighter 2 from 2008: its computer players stop at
CRAZY!. INSANE! and XOI live in OpenLF2, which plays the same mod files. Install it once and every mod you
have plays with them — and you can train XOI for your own mod, then publish it with INSANE! and XOI built
in: its players unzip one folder and play, nothing to install.
File .exe đi kèm bản mod là Little Fighter 2 gốc từ năm 2008: máy chỉ tới CRAZY!.
INSANE! và XOI nằm trong OpenLF2, chơi được chính các file của bản mod. Cài một lần là mọi bản mod của bạn đều có
hai mức máy này — và bạn còn tự huấn luyện XOI được cho bản mod của mình, rồi xuất bản nó có sẵn INSANE! và
XOI: người chơi giải nén một thư mục là chơi, không cài gì.
OpenLF2-Windows-x64.exe, choose Install for me only.
Chạy OpenLF2-Windows-x64.exe, chọn Install for me only.xoi-kit.zip into Documents, say: the files are in its LF2-XOI-kit folder.
Giải nén xoi-kit.zip, ví dụ vào Documents: các file nằm trong thư mục LF2-XOI-kit của nó..zip, its folder or its .exe. In the game, go past CRAZY! to INSANE! or XOI.
File .zip, thư mục hay file .exe của bản mod. Trong game, bấm qua CRAZY! là tới INSANE!, rồi XOI.An LF2 mod is the original game's program (lf2.exe, often renamed) with new data: fighters,
moves, backgrounds. That program has four computer levels, Easy to CRAZY!, written in 2008 for the original fighters.
INSANE! — a fifth level that learns every fighter's moves from the mod's data before the match — and XOI —
INSANE! with notes from training on every matchup — are part of OpenLF2, an open-source re-implementation of LF2 that
reads the same data. So the AI is not put into the mod's .exe: the mod is opened with OpenLF2, and the mod's
files stay as they are.
Một bản mod LF2 là chương trình của game gốc (lf2.exe, thường được đổi tên) cộng dữ liệu mới:
nhân vật, chiêu, bối cảnh. Chương trình ấy có bốn mức máy, Easy tới CRAZY!, viết năm 2008 cho các nhân vật gốc.
INSANE! — mức thứ năm, học chiêu của từng nhân vật từ chính dữ liệu bản mod trước trận — và XOI — INSANE!
cộng bộ nhớ huấn luyện từng cặp nhân vật — là một phần của OpenLF2, bản viết lại mã nguồn mở của LF2 đọc cùng dữ liệu ấy.
Vì vậy AI không được gắn vào file .exe của bản mod: bản mod được mở bằng OpenLF2, còn các file của bản mod
giữ nguyên.
| File | What it is | Where to get it |
|---|---|---|
OpenLF2-Windows-x64.exe | The OpenLF2 installer for Windows 10 and 11, 64-bit (about 8 MB).
OpenLF2-Windows-x86.exe for 32-bit Windows, OpenLF2-Windows-arm64.exe for ARM PCs. |
Releases of this project on GitHub |
xoi-kit.zip | choi.bat (play), xoi-hoc.bat (train),
dau-nhieu.bat (measure), spsa.bat (tune), xem.bat (watch), kiem-tra.bat (check), the newest game
scripts with INSANE! and XOI, and the training bench (about 3 MB). |
This site, or the release |
xoi-kit-en.zip | The same kit in English, for friends abroad: play.bat,
train.bat, measure.bat, spsa.bat, watch.bat, publish.bat, check.bat,
their settings and messages in English (its README maps the Vietnamese names of this guide onto them; results in
results.txt, the earlier notes as <mod>-xoi-previous.zip). |
This site, or the release |
balance-kit.zip | For mod makers, in English, on its own: balance.bat
measures each fighter's win rate against every other one and what each of its moves brings
(below; the same tool is in both kits: can-bang.bat, balance.bat). |
This site, or the release |
| Your mod | The mod as a .zip of its game folder — the folder that has data\data.txt
in it, where the mod's .exe is — or that folder itself. A .rar or .7z: extract it
first (with 7-Zip). | Its author, or wherever you got it |
| XOI notes (optional) | What training learned about the mod: inside the mod's zip
(<mod>-xoi.zip, file xoi\notes.txt) or as a text file (<mod>-notes.txt).
Without notes, XOI still plays with its tuned numbers (INSANE! with the ones set by hand). | Whoever trained the mod — or yourself, below |
| File | Là gì | Lấy ở đâu |
|---|---|---|
OpenLF2-Windows-x64.exe | Bộ cài OpenLF2 cho Windows 10 và 11, 64-bit (khoảng 8 MB).
OpenLF2-Windows-x86.exe cho Windows 32-bit, OpenLF2-Windows-arm64.exe cho máy chip ARM. |
Mục Releases của dự án trên GitHub |
xoi-kit.zip | choi.bat (chơi), xoi-hoc.bat (huấn luyện),
dau-nhieu.bat (đo), spsa.bat (chỉnh số), xem.bat (xem), kiem-tra.bat (kiểm tra), scripts mới
nhất của game có INSANE! và XOI, và bộ công cụ huấn luyện (khoảng 3 MB). |
Trang này, hoặc trong bản release |
xoi-kit-en.zip | Bộ XOI bản tiếng Anh, để gửi bạn bè nước ngoài: cùng các công cụ dưới tên tiếng Anh
(play.bat = choi.bat, train.bat = xoi-hoc.bat, measure.bat = dau-nhieu.bat, spsa.bat,
watch.bat = xem.bat, publish.bat = xuat-ban.bat, check.bat = kiem-tra.bat), dòng chỉnh và thông báo
bằng tiếng Anh; README của nó ghi tên tương ứng với hướng dẫn này. |
Trang này, hoặc trong bản release |
balance-kit.zip | Cho người làm mod, bản tiếng Anh, tải riêng: balance.bat
đo tỉ lệ thắng của từng nhân vật trước từng nhân vật khác và mỗi chiêu của nó mang lại gì
(bên dưới; công cụ này có sẵn trong cả hai bộ XOI: can-bang.bat, balance.bat). |
Trang này, hoặc trong bản release |
| Bản mod của bạn | Bản mod dạng file .zip của thư mục game — thư mục có data\data.txt
bên trong, nơi có file .exe của bản mod — hoặc chính thư mục ấy. File .rar hay .7z:
giải nén trước (bằng 7-Zip). | Tác giả bản mod, hoặc nơi bạn tải về |
| Bộ nhớ XOI (không bắt buộc) | Những gì huấn luyện học được về bản mod: nằm trong file zip bản mod
(<tên>-xoi.zip, file xoi\notes.txt) hoặc là một file chữ riêng (<tên>-notes.txt).
Không có bộ nhớ thì XOI vẫn chơi bằng các số đã chỉnh của nó (INSANE! dùng số đặt bằng tay). | Người đã huấn luyện bản mod — hoặc chính bạn, bên dưới |
The three .bat files are for Windows. OpenLF2 itself also runs on Linux, macOS and Android,
and in the browser: the web version on this site has INSANE! and XOI too.
Ba file .bat dành cho Windows. Bản thân OpenLF2 còn chạy trên Linux, macOS, Android và trong
trình duyệt: bản web trên trang này cũng có INSANE! và XOI.
OpenLF2-Windows-x64.exe and run it. If Windows shows Windows protected your PC
(the installer is not code-signed), click More info, then Run anyway.%LOCALAPPDATA%\Programs\OpenLF2. Install for all users works too: the .bat files find both.xoi-kit.zip (right-click it, Extract All…) into a folder you can write to, such as
Documents — not into Program Files. The kit is its LF2-XOI-kit folder: the
.bat files, the mods you put there and everything they make live together in it.OpenLF2-Windows-x64.exe rồi chạy. Windows báo Windows protected your PC (bộ cài chưa có
chữ ký số) thì bấm More info, rồi Run anyway.%LOCALAPPDATA%\Programs\OpenLF2. Chọn Install for all users cũng được: các file .bat tìm được cả hai chỗ.xoi-kit.zip (chuột phải, Extract All…) vào một thư mục ghi được, ví dụ
Documents — đừng để trong Program Files. Bộ XOI là thư mục LF2-XOI-kit bên trong:
các file .bat, các bản mod bạn đặt vào và mọi thứ chúng tạo ra đều nằm chung ở đó.Later versions: install a newer OpenLF2 over the old one; unzip a newer kit over the old folder — your
mods, notes and results stay (settings you changed inside the .bat files are replaced).
Bản mới về sau: cài OpenLF2 mới đè lên bản cũ; giải nén bộ XOI mới đè lên thư mục cũ — bản mod, bộ nhớ và
kết quả của bạn vẫn còn (những dòng bạn đã sửa trong các file .bat thì bị thay).
.zip in the kit folder, next to choi.bat, and double-click choi.bat.
Or drag onto choi.bat the mod's .zip, its folder, or its .exe (which stands for its
folder). A folder is zipped into the kit folder as <folder name>.zip, which double-clicking plays from then on.<mod>-xoi.zip has them inside, and a double-click picks a
*-xoi.zip first. A notes file: select it together with the mod and drag both onto choi.bat —
or name it <mod>-notes.txt and leave it next to choi.bat. choi.bat then makes
<mod>-xoi.zip in the kit folder; your mod's own file is not changed.INSANE! v29, or XOI v29, 2926 matchups with how many pairs of fighters its notes
know (no notes without any).choi.bat draws with OpenGL, since the game's
usual renderer ("gpu") shows some PCs nothing but the menu's blue. Should it still happen: right-click
choi.bat, Edit, set VE=software, save, and run it again.OpenLF2-Windows-x64.exe — the x86 one is
only for 32-bit Windows (x86 builds made before November 2, 2026 close at once wherever they draw with OpenGL,
as choi.bat has them do). Should it still happen: put a mod's .zip next to kiem-tra.bat, double-click it,
wait about two minutes (game windows may open and close by themselves) and send the kiem-tra.txt it
writes..zip bản mod vào thư mục bộ XOI, cạnh choi.bat, rồi nháy đúp choi.bat.
Hoặc kéo thả vào choi.bat file .zip bản mod, thư mục bản mod, hay file .exe của bản mod
(thay cho thư mục của nó). Thư mục được nén thành <tên thư mục>.zip trong thư mục bộ XOI; từ đó về sau
nháy đúp là chơi file này.<tên>-xoi.zip có sẵn bộ nhớ bên trong, và khi nháy đúp
choi.bat ưu tiên file *-xoi.zip. Có file bộ nhớ riêng: chọn nó cùng bản mod rồi kéo cả hai vào
choi.bat — hoặc đặt tên nó là <tên>-notes.txt và để cạnh choi.bat.
choi.bat sẽ tạo <tên>-xoi.zip trong thư mục bộ XOI; file bản mod của bạn giữ nguyên.INSANE! v29, hoặc XOI v29, 2926 matchups cùng số cặp nhân vật mà bộ nhớ biết
(no notes khi không có).choi.bat vẽ bằng OpenGL, vì cách vẽ thường dùng
của game ("gpu") ở vài máy chỉ hiện nền xanh của menu. Nếu vẫn bị: chuột phải choi.bat, Edit,
sửa thành VE=software, lưu, chạy lại.OpenLF2-Windows-x64.exe — bản x86 chỉ dành cho
Windows 32-bit (bản x86 làm trước ngày 2/11/2026 tắt ngay khi vẽ bằng OpenGL, cách vẽ mà choi.bat dùng). Nếu vẫn bị: đặt file
.zip bản mod cạnh kiem-tra.bat, nháy đúp, đợi khoảng hai phút (cửa sổ game có thể tự hiện rồi
tự tắt) rồi gửi file kiem-tra.txt nó tạo ra.| Line | Empty (default) means | Set it to |
|---|---|---|
GAME | The installed game, found by itself (for you, for all users, or an OpenLF2 folder next to the file) | The full path of openlf2.exe installed elsewhere |
PACK | The first *-xoi.zip next to choi.bat, else the first .zip (or what you drag onto it) | One mod to always play: a .zip or a folder |
NOTES | <mod>-notes.txt or xoi-<mod>\notes.txt next to choi.bat, if there | A notes file to add to the mod |
VE | OpenGL — and the game's usual renderer when OpenGL does not open | software where the window stays blue or black; gpu, opengl, direct3d11 to pick one |
| Dòng | Để trống (mặc định) là | Sửa thành |
|---|---|---|
GAME | Game đã cài, tự tìm (cài cho bạn, cho mọi người, hoặc thư mục OpenLF2 cạnh file) | Đường dẫn đầy đủ tới openlf2.exe cài ở chỗ khác |
PACK | File *-xoi.zip đầu tiên cạnh choi.bat, không có thì file .zip đầu tiên (hoặc thứ bạn kéo thả vào) | Một bản mod luôn chơi: file .zip hoặc thư mục |
NOTES | <tên>-notes.txt hoặc xoi-<tên>\notes.txt cạnh choi.bat, nếu có | Một file bộ nhớ để thêm vào bản mod |
VE | OpenGL — và cách vẽ thường dùng của game khi OpenGL không mở được | software khi cửa sổ chỉ xanh hay đen; gpu, opengl, direct3d11 để chọn hẳn một cách |
The kit's scripts folder holds the game scripts with the newest INSANE! and XOI. When they are
newer than the installed game's, choi.bat lays them over a copy of the installed scripts
(scripts-choi) and plays with that: a new AI without reinstalling the game. When the installed game is as new or
newer, it plays as installed.
Thư mục scripts của bộ XOI chứa scripts của game với INSANE! và XOI mới nhất. Khi chúng mới hơn
scripts của game đã cài, choi.bat ghép chúng lên một bản sao scripts đã cài (scripts-choi) rồi chơi
bằng bản ấy: có AI mới mà không phải cài lại game. Game đã cài mới bằng hoặc mới hơn thì chơi đúng như đã cài.
Training plays INSANE! against INSANE! in many games of every pair of the mod's fighters, on every processor thread of the PC, with no window drawn, and writes down what each move brought against each opponent and in which situation. The notes go into a copy of the mod's zip; XOI plays with them. What the notes hold and how XOI uses them.
Huấn luyện là cho INSANE! đấu INSANE! thật nhiều trận với mọi cặp nhân vật của bản mod, trên mọi luồng CPU của máy, không vẽ hình, và ghi lại mỗi chiêu đem lại gì trước từng đối thủ, trong hoàn cảnh nào. Bộ nhớ được đóng vào một bản sao của file zip bản mod; XOI chơi với bộ nhớ ấy. Bộ nhớ chứa gì và XOI dùng nó ra sao (tiếng Anh).
.zip next to xoi-hoc.bat — the only mod zip there, or drag it onto
xoi-hoc.bat. A mod folder: drag it onto choi.bat once to get its zip.xoi-hoc.bat (right-click, Edit; the table below). The
defaults train every pair of fighters 100 games on every thread.xoi-hoc.bat. It opens one minimized window per thread — they draw nothing; leave them
— and waits for them. The PC is busy meanwhile: don't play on it.<mod>-xoi.zip beside the mod's zip — the mod
with xoi\notes.txt inside — and xoi-<mod>\notes.txt, the notes alone.<mod>-xoi.zip with choi.bat (pick XOI), and measure it
with dau-nhieu.bat..zip bản mod cạnh xoi-hoc.bat — chỉ một file zip bản mod ở đó, hoặc kéo thả nó
vào xoi-hoc.bat. Bản mod dạng thư mục: kéo thư mục vào choi.bat một lần để có file zip.xoi-hoc.bat (chuột phải, Edit; bảng bên dưới). Mặc định: mọi cặp
nhân vật, mỗi cặp 100 trận, trên mọi luồng CPU.xoi-hoc.bat. Mỗi luồng CPU một cửa sổ thu nhỏ — chúng không vẽ gì, cứ để đó — và file
chờ chúng chạy xong. Trong lúc này máy rất bận: đừng chơi game trên máy.<tên>-xoi.zip cạnh file zip bản mod — bản mod có
xoi\notes.txt bên trong — và xoi-<tên>\notes.txt, riêng bộ nhớ.<tên>-xoi.zip bằng choi.bat (chọn XOI), và đo nó bằng
dau-nhieu.bat.| Line | Default | What it does |
|---|---|---|
IDS | all | Fighters to train: every fighter of the mod, or a list of ids such as "1 2 3 7" (only the pairs among them) |
VAN | 100 | Games of each pair (both fighters are learned). 100–200 is plenty; 20 for a quick first try |
SONG_SONG | %NUMBER_OF_PROCESSORS% | Games played at once, one per thread. Lower it (half, say) to keep the PC usable |
HAT_GIONG_DAU | 5000 | The first random seed. Change it for every further round (6000, 7000…): rounds add up |
NAO | smart | Who plays in training: smart = INSANE! against INSANE! (first round); xoi = XOI against XOI on the notes so far |
GAME, PACK | empty | Found by themselves; set them when the game or the mod is elsewhere |
BENCH, SCRIPTS | empty | The kit's tools\ai-bench and scripts, found by themselves |
| Dòng | Mặc định | Ý nghĩa |
|---|---|---|
IDS | all | Nhân vật được học: mọi nhân vật của bản mod, hoặc danh sách id như "1 2 3 7" (chỉ các cặp trong số đó) |
VAN | 100 | Số trận mỗi cặp (học cả hai nhân vật). 100–200 là đủ; 20 để thử nhanh lần đầu |
SONG_SONG | %NUMBER_OF_PROCESSORS% | Số trận chạy cùng lúc, mỗi luồng CPU một trận. Giảm (ví dụ một nửa) để máy còn dùng được |
HAT_GIONG_DAU | 5000 | Hạt giống ngẫu nhiên đầu tiên. Mỗi đợt học thêm đổi số này (6000, 7000…): các đợt cộng dồn |
NAO | smart | Ai đánh khi học: smart = INSANE! đấu INSANE! (đợt đầu); xoi = XOI đấu XOI bằng bộ nhớ đã có |
GAME, PACK | trống | Tự tìm; chỉ sửa khi game hay bản mod nằm chỗ khác |
BENCH, SCRIPTS | trống | tools\ai-bench và scripts của bộ XOI, tự tìm |
Games = pairs × VAN, with n(n−1)/2 pairs for n fighters; a game takes about
1.5 seconds of one thread (more with big fighters and long matches). At VAN=100:
Số trận = số cặp × VAN, với n(n−1)/2 cặp cho n nhân vật; mỗi trận mất chừng
1,5 giây của một luồng (lâu hơn với nhân vật nặng, trận dài). Với VAN=100:
| FightersNhân vật | PairsCặp | GamesTrận | 8 threads8 luồng | 16 threads16 luồng | 104 threads104 luồng |
|---|---|---|---|---|---|
| 20 | 190 | 19,000 | ~1 h | ~30 min | ~5 min |
| 40 | 780 | 78,000 | ~4 h | ~2 h | ~20 min |
| 77 (Naruto 2.4) | 2,926 | 292,600 | ~15 h | ~7.5 h | ~1.2 h |
A big roster on an ordinary PC: start with VAN=20, or with IDS set to the fighters
people play most; train more later. Closing the windows stops training; the pairs already finished are kept — run
xoi-hoc.bat gop (or drag the xoi-<mod> folder onto it) to merge and pack them.
A fighter that only stands (One Piece GrandWorld's Dummy, OPLoS's TrainingBot) used to keep every game of
its pairs to the time limit, so the window with those pairs finished long after the others; since November 2, 2026
a game in which nobody loses HP for a minute ends there.
Bản mod nhiều nhân vật trên máy thường: bắt đầu với VAN=20, hoặc đặt IDS là các nhân
vật hay được chơi nhất; học thêm sau. Đóng các cửa sổ là dừng huấn luyện; những cặp đã xong vẫn được giữ — chạy
xoi-hoc.bat gop (hoặc kéo thư mục xoi-<tên> vào nó) để gộp và đóng gói chúng.
Nhân vật chỉ đứng yên (Dummy của One Piece GrandWorld, TrainingBot của OPLoS) trước đây làm mọi trận của
các cặp có nó kéo tới hết giờ, nên cửa sổ có các cặp ấy xong sau các cửa sổ khác rất lâu; từ ngày 2/11/2026, trận nào
một phút không ai mất máu thì dừng ở đó.
HAT_GIONG_DAU and run again; the notes of every round of the mod are merged into
one. NAO=xoi makes the next round XOI against XOI on the notes so far.<mod>-xoi-truoc.zip. Measure both
(below) on the same seed and keep the better. On Naruto 2.4 a second round did not make XOI measurably
stronger: the first round of 100–200 games a pair does most of the work.xoi-hoc.bat gop, or drag the xoi-<mod> folder onto xoi-hoc.bat.HAT_GIONG_DAU rồi chạy lại; bộ nhớ mọi đợt của bản mod được gộp làm một.
NAO=xoi cho đợt sau là XOI đấu XOI bằng bộ nhớ đã có.<tên>-xoi-truoc.zip. Đo cả hai
(bên dưới) cùng hạt giống rồi giữ bản tốt hơn. Ở Naruto 2.4, đợt thứ hai không làm XOI mạnh hơn đo
được: đợt đầu 100–200 trận mỗi cặp đã làm gần hết.xoi-hoc.bat gop, hoặc kéo thư mục xoi-<tên> vào xoi-hoc.bat.dau-nhieu.bat plays two computer players against each other on every pair of fighters, each in
both seats, on every thread, and adds it all up.
dau-nhieu.bat cho hai loại máy đấu nhau trên mọi cặp nhân vật, đổi bên đủ hai chiều, trên mọi
luồng CPU, rồi cộng kết quả.
<mod>-xoi.zip next to dau-nhieu.bat (it picks a *-xoi.zip first),
or drag it onto dau-nhieu.bat.NAO1=xoi against NAO2=smart (INSANE!), IDS=all, VAN=10
games per pair and seat, HAT_GIONG_DAU=1000 — seeds training did not use.Ti le thang cua brains[1]: 55.3% tren 5852 tran co ket qua, sai so khoang +-1.2%: brains[1] (XOI) wins 55.3%,
give or take 1.2. More than 50% by more than that margin: XOI is stronger on this mod.ket-qua-<seed>\ (cap.txt: every pair; run-*.txt: every game).
Drag that folder onto dau-nhieu.bat to print the summary again.<tên>-xoi.zip cạnh dau-nhieu.bat (ưu tiên file *-xoi.zip), hoặc kéo
thả nó vào dau-nhieu.bat.NAO1=xoi đấu NAO2=smart (INSANE!), IDS=all, VAN=10 trận
mỗi cặp mỗi bên, HAT_GIONG_DAU=1000 — hạt giống huấn luyện không dùng.Ti le thang cua brains[1]: 55.3% tren 5852 tran co ket qua, sai so khoang +-1.2%: brains[1] (XOI) thắng 55,3%,
sai số chừng 1,2. Trên 50% nhiều hơn sai số: XOI mạnh hơn trên bản mod này.ket-qua-<hạt giống>\ (cap.txt: từng cặp; run-*.txt:
từng trận). Kéo thư mục ấy vào dau-nhieu.bat để in lại bảng tổng.NAO1, NAO2: xoi (XOI), smart (INSANE!), classic (the
original game's AI — with MUC=-1 it plays at CRAZY!), smart@ai_alt (another
smart_ai.lua, copied to tools\ai-bench\ai_alt.lua).<mod>-xoi.zip and <mod>-xoi-truoc.zip): measure each against
INSANE! with the same HAT_GIONG_DAU, set PACK to each in turn, and compare the two rates.NAO1, NAO2: xoi (XOI), smart (INSANE!), classic (máy
của game gốc — với MUC=-1 nó đánh mức CRAZY!), smart@ai_alt (một bản smart_ai.lua
khác, chép vào tools\ai-bench\ai_alt.lua).<tên>-xoi.zip và <tên>-xoi-truoc.zip): đo từng bộ đấu INSANE! cùng
HAT_GIONG_DAU, lần lượt đặt PACK là từng file, rồi so hai tỉ lệ.can-bang.bat (balance.bat in English) has one computer player — XOI — play both sides of
every pair of fighters of a mod, on every CPU thread, again and again: each pair on both sides, on the same stage, from the
same point of the random sequence. Then it counts each fighter's win rate against all the others and against each one, and
what each of its moves brings. The numbers, not a verdict: what to change is the mod maker's to say.
can-bang.bat (bản tiếng Anh: balance.bat) cho một máy — XOI — chơi cả hai bên mọi cặp
nhân vật của bản mod, trên mọi luồng CPU, lặp đi lặp lại: mỗi cặp đổi bên đủ hai chiều, cùng sân, cùng điểm xuất phát của dãy
số ngẫu nhiên. Rồi nó đếm tỉ lệ thắng của từng nhân vật trước mọi nhân vật khác và trước từng nhân vật, và mỗi chiêu của nó
mang lại gì. Báo cáo chỉ ghi số đo được: chỉnh gì là việc của người làm mod.
.zip next to balance.bat (or can-bang.bat in the XOI kit), or drag it
onto the file. A mod you trained XOI for: use <mod>-xoi.zip — XOI plays it stronger.TOTAL_GAMES (all the games, e.g. 200000) or
TOTAL_HOURS (all the hours, 7.5 = seven and a half), split into ROUNDS rounds — after each
one the report is updated; left empty, the rounds are split for you, each from 10 minutes to an hour. In
can-bang.bat: TONG_VAN, TONG_GIO, VONG.balance-<mod>\ (can-bang-<mod>\): report.html
(bao-cao.html) to open in a browser, and a text summary results.txt (ket-qua.txt). After every
round the file also shows the games per hour, to size the next run.RUN_HOURS), run the file again later — the round under way goes
on. To measure more: raise the total and run it again; the new games add up..zip bản mod cạnh can-bang.bat (trong bộ XOI; bộ tiếng Anh: balance.bat),
hoặc kéo thả nó vào file. Bản mod đã huấn luyện XOI: dùng <tên>-xoi.zip — XOI chơi mạnh hơn.TONG_VAN (tổng số ván, ví dụ 200000) hoặc
TONG_GIO (tổng số giờ, 7,5 = 7 giờ rưỡi), chia làm VONG vòng — hết mỗi vòng báo cáo được
cập nhật; để trống VONG thì tự chia, mỗi vòng từ 10 phút tới 1 giờ.can-bang-<tên>\: bao-cao.html mở bằng trình duyệt, và bản tóm tắt
ket-qua.txt. Hết mỗi vòng file còn báo số ván một giờ, để tính cho lần sau.GIO_CHAY), lúc khác chạy lại — vòng đang dở được làm tiếp. Đo
thêm: tăng tổng rồi chạy lại, các ván mới cộng dồn vào..dat file.BRAIN (NAO) = xoi, the default (or left empty) — XOI needs no file of the
XOI kit: a mod without XOI's numbers or brain is played with its default numbers; smart (INSANE!);
classic (the original computer player, which plays a mod's own AI scripts, ai\<id>.as). Each gets its
own folder. A fighter strong with every player is almost surely strong..dat của nhân vật.NAO = xoi, mặc định (để trống cũng vậy) — XOI không cần file gì của bộ XOI: bản mod
chưa có thang số hay bộ não thì XOI chơi bằng số mặc định; smart (INSANE!); classic (máy gốc, chơi bằng
script AI riêng của bản mod nếu có, ai\<id>.as). Mỗi máy một thư mục riêng. Nhân vật mạnh với mọi máy thì gần
như chắc là mạnh thật.xem.bat plays two computer players against each other in the game's window, fighters
named as the game shows them — no ids to look up.
xem.bat cho hai máy đánh nhau trong cửa sổ game, nhân vật gõ theo tên như trong game — không
cần tra id.
xem.bat in Notepad (right-click, Edit) and set QUAN1, QUAN2: two
fighters by name (Crimson, Deep; capitals or not, the first letters are enough:
crim) or by id; NAO1, NAO2: xoi (XOI), smart (INSANE!) or
classic (with MUC=-1, the original game's AI at CRAZY!).VAN games, sides swapped every game. In the window F1 pauses, F5 runs fast, F4
ends the game under way (after the last one, it closes the window); the score of each game is printed when the window
closes.HAT_GIONG plays the
same games again — to record once more; another number, other games.QUAN1 empty: it lists the mod's fighters (id and name) and backgrounds
into danh-sach.txt. A name that matches nobody: the window lists them too.xem.bat bằng Notepad (chuột phải, Edit), sửa QUAN1, QUAN2: hai nhân vật
theo tên (Crimson, Deep; hoa thường đều được, vài chữ đầu cũng được: crim) hoặc theo id;
NAO1, NAO2: xoi (XOI), smart (INSANE!) hoặc classic (với
MUC=-1, máy của game gốc ở mức CRAZY!).VAN trận, mỗi trận đổi bên. Trong cửa sổ: F1 dừng, F5 chạy nhanh, F4 bỏ trận đang xem (hết
trận thì F4 đóng cửa sổ); đóng cửa sổ là file in tỉ số từng trận.HAT_GIONG thì ra đúng các trận cũ —
quay lại được; đổi số là trận khác.QUAN1: file in danh sách nhân vật (id và tên) và màn nền của bản mod ra
danh-sach.txt. Gõ tên không khớp ai: cửa sổ game cũng hiện danh sách ấy.NEN: the background, by name (HK Coliseum, hk) or number; empty: a random one.
GIOI_HAN: a game still on after that many ticks (30 a second; 9000 = 5 minutes) is a draw, and the next begins.*-xoi.zip beside it first (XOI's notes and numbers inside), or drag a zip,
a mod folder or a published mod's .exe onto it.dau-nhieu.bat takes names too: IDS=Crimson Deep 4. It plays without a window, for the numbers.NEN: màn nền, theo tên (HK Coliseum, hk) hay số; để trống: ngẫu nhiên.
GIOI_HAN: trận quá số tick ấy (30 tick một giây; 9000 = 5 phút) tính hòa, sang trận sau.*-xoi.zip cạnh nó (có bộ nhớ và bộ số của XOI), hoặc kéo thả file zip,
thư mục bản mod hay file .exe của bản đã xuất bản vào nó.dau-nhieu.bat cũng nhận tên: IDS=Crimson Deep 4. Nó chạy không cửa sổ, để lấy số liệu.XOI learns, pair by pair, which moves work. spsa.bat tunes something else: the 88 numbers
the computer player's judgement rests on — what a hit is worth against what it costs, the score a move needs, how far ahead it
answers a blow on its way and when it guards, how bold a standoff makes it, how far to keep from longer arms or from a
fallen enemy, when to charge MP, how soon it gives up a move that keeps coming to nothing, and (from package 71) how much
bolder or warier the HP just dealt or lost makes it, the six "momentum" numbers, 0 until a tuning moves them — the way chess engines tune
theirs. The numbers can suit every mod at once, or one mod alone: a mod then carries its own. The tuned numbers are
XOI's alone (from package 43): INSANE! keeps its own, set by hand, so that XOI, the last level, is plainly the stronger.
XOI học theo từng cặp xem chiêu nào hiệu quả. spsa.bat chỉnh thứ khác: 88 con số mà phán
đoán của máy dựa vào — một đòn đáng bao nhiêu so với cái giá của nó, điểm một chiêu cần có để ra đòn, nhìn trước bao
xa để đỡ hay né đòn đang tới và khi nào thì đỡ, đứng nhìn nhau lâu thì máy bạo dạn lên bao nhiêu, đứng cách đối thủ tay
dài hay đối thủ đã ngã bao xa, khi nào nạp MP, một chiêu cứ ra mà không ăn thì bao lâu mới bỏ, và (từ gói 71) máu vừa gây
hay vừa mất làm máy hăng lên hay dè dặt đi bao nhiêu, sáu số "đà", bằng 0 cho tới khi được chỉnh — giống cách các chương
trình cờ vua chỉnh số của chúng. Các số có thể hợp với mọi bản mod, hoặc riêng một bản mod: bản mod ấy giữ bộ số riêng. Các
số chỉnh được chỉ XOI dùng (từ gói 43): INSANE! giữ các số đặt bằng tay của nó, để XOI, mức cuối, mạnh hơn rõ ràng.
.zip next to spsa.bat (not the *-xoi.zip copies), or drag
one onto it. Several mods: the processes are shared among them, and the numbers suit them all. One mod: the
numbers suit that mod best.PHUT_VONG
minutes: two computer players, the 88 numbers nudged one way for one and the other way for the other (each number up or
down at random), each playing each fighter of a random pair on the same stage; every number then moves toward
whichever did better. All processes stop together, so no thread sits waiting for a slower one (a fast mod simply
plays more pairs). After the round the mean step per pair is taken, every mod weighing the same, and the next round
starts from there.PHUT_KIEM_TRA
minutes. A pair takes a process about 1 to 3 seconds, on the CPU only (up to about half a GB of memory per process);
the processes run at below-normal priority, so the PC stays usable. After each round spsa.bat says how
long it took and about how long the rest will take. To pause, close its window and the minimized SPSA windows
(or shut the PC down); double-click again to go on — finished rounds stay, and so does what the round under way had
played, but for its last few pairs. A PC cut off just as a round's numbers were written (that round's file left full
of zeros) is no loss either: run it again and it merges that round from the processes that played it, then goes on.
So is Khong gop duoc vong 1 (Could not merge round 1) with the game of packages 69 to 71 on
Windows, whose last message cut a process's last line of numbers in two: copy the kit of package 72 or later over
the old one, keep the spsa folder, and run it again. Pause timer (package 73):
set "GIO_CHAY=8" (RUN_HOURS in the English kit; 7,5 = seven and a half hours) —
when the time is up the processes under way stop, keeping what they played, and spsa.bat ends; run it
again later to go on. Closing its window stops its games too (package 73 on; before, the games of packages 69–72
kept running in the background — taskkill /F /IM openlf2.exe ends them).
Your own settings (rounds, minutes, DOI_THU=classic…) are best kept in a file
spsa-cai-dat.bat beside spsa.bat (spsa-settings.bat for the English kit), one
set "VONG=60" line each: a new kit's spsa.bat copied over the old one then keeps them.
Going on from a finished run (package 75), after updating the game and the kit, say: raise VONG
(ROUNDS; 60 to 80 adds 20 rounds) and run it again — the added rounds start from the last round's numbers,
the steps go on shrinking as before, they use the new kit's scripts (the new AI), and the run ends with a new check and
new packages. Better than starting over: the numbers found still fit, and a new run begins with large steps again.
(A run paused half way keeps the scripts it began with to its end.)xoi-<mod>\tune.txt holds the tuned numbers and
<mod>-xoi.zip is the mod with them inside (xoi/tune.txt beside its data
folder, with XOI's notes if xoi-hoc.bat trained it). Uploaded to the relay in place of the mod, XOI plays that
mod with its own numbers, every player in a room alike (INSANE! keeps its own); the match shows mod tuned beside XOI.
Upload it only if the check came out above 50%. With that mod alone next to spsa.bat, the next run goes on
from its numbers (and checks against them).spsa\ket-qua.txt to whoever maintains the AI: the tuned numbers, how far each moved, and how the
tuned numbers did against the numbers they started from. Numbers that suit every mod go into XOI's own numbers only
after they also win the usual measures..zip bản mod cạnh spsa.bat (không phải các bản *-xoi.zip), hoặc
kéo thả một file vào nó. Nhiều bản mod: các tiến trình chia nhau, các con số hợp với tất cả. Một bản mod: các con số
hợp nhất với bản mod ấy.PHUT_VONG phút: hai
máy, 88 con số nhích một phía cho máy này và phía ngược lại cho máy kia (mỗi số lên hay xuống ngẫu nhiên), mỗi máy
cầm mỗi nhân vật của một cặp ngẫu nhiên trên cùng một sân; mọi con số rồi dịch về phía máy đánh tốt hơn. Mọi tiến trình
dừng cùng lúc nên không luồng nào ngồi chờ luồng chậm (bản mod nhanh chỉ đánh được nhiều cặp hơn). Hết vòng, lấy bước dịch
trung bình mỗi cặp, mỗi bản mod nặng như nhau, vòng sau bắt đầu từ đó.PHUT_KIEM_TRA phút. Một cặp mất mỗi tiến
trình khoảng 1 đến 3 giây, chỉ dùng CPU (mỗi tiến trình tới khoảng nửa GB bộ nhớ); các tiến trình chạy ở mức ưu tiên thấp
nên máy vẫn dùng được. Hết mỗi vòng spsa.bat in vòng ấy mất bao lâu và còn khoảng bao lâu. Tạm dừng:
đóng cửa sổ của nó và các cửa sổ SPSA thu nhỏ (hoặc tắt máy); nháy đúp lại là làm tiếp — các vòng đã xong được giữ, và
cả phần vòng đang dở đã đánh, trừ vài cặp cuối. Máy mất điện đột ngột đúng lúc ghi số cuối vòng (file số của vòng ấy
hỏng, toàn số 0) cũng không sao: chạy lại, nó gộp lại vòng ấy từ các tiến trình đã đánh rồi đi tiếp. Báo
Khong gop duoc vong 1 với game gói 69 tới 71 trên Windows (dòng báo cuối của game cắt đôi dòng số cuối của
một tiến trình) cũng vậy: chép đè bộ XOI từ gói 72 trở lên lên bộ cũ, giữ thư mục spsa, rồi chạy lại.
Hẹn giờ tạm dừng (gói 73): set "GIO_CHAY=8" (7,5 = bảy giờ rưỡi) — hết giờ, các tiến
trình đang đánh dừng lại, giữ phần đã đánh, và spsa.bat kết thúc; lúc khác chạy lại là làm tiếp. Đóng
cửa sổ của nó thì các game của nó cũng dừng (từ gói 73; trước đó game gói 69–72 vẫn chạy ngầm —
taskkill /F /IM openlf2.exe tắt chúng). Cài đặt riêng của
bạn (số vòng, số phút, DOI_THU=classic…) nên để trong file spsa-cai-dat.bat cạnh
spsa.bat (bộ tiếng Anh: spsa-settings.bat), mỗi dòng một cài đặt như set "VONG=60":
chép đè spsa.bat của bộ XOI mới lên thì cài đặt vẫn còn.
Chỉnh tiếp một đợt đã xong (gói 75), ví dụ sau khi cập nhật game và bộ XOI: tăng VONG (60 lên 80 là
thêm 20 vòng) rồi chạy lại — các vòng thêm bắt đầu từ bộ số của vòng cuối, bước dịch nhỏ dần tiếp như cũ, dùng scripts
của bộ XOI mới (AI bản mới), và cuối đợt kiểm tra, gói số lại. Tốt hơn chỉnh lại từ đầu: bộ số đã tìm vẫn dùng được,
còn một đợt mới thì bắt đầu lại bằng bước dịch lớn. (Một đợt đang tạm dừng giữa chừng thì giữ scripts của nó cho tới hết.)xoi-<tên>\tune.txt là các số đã chỉnh, và
<tên>-xoi.zip là bản mod có bộ số ấy bên trong (xoi/tune.txt cạnh thư mục data,
kèm bộ nhớ XOI nếu xoi-hoc.bat đã huấn luyện). Tải nó lên relay thay cho bản mod: XOI chơi bản mod ấy bằng bộ
số riêng của nó, mọi người trong phòng như nhau (INSANE! giữ số của nó); trong trận ghi mod tuned cạnh XOI. Chỉ tải lên
khi phần kiểm tra trên 50%. Để riêng bản mod ấy cạnh spsa.bat thì lần sau chỉnh tiếp từ bộ số của nó (và
kiểm tra so với bộ số ấy).spsa\ket-qua.txt cho người làm AI: các số đã chỉnh, mỗi số dịch bao nhiêu, và bản đã chỉnh đấu với
các số lúc bắt đầu ra sao. Bộ số hợp với mọi bản mod chỉ được đưa vào bộ số của chính XOI khi cũng thắng ở các phép đo
thường dùng.VONG rounds (12), PHUT_VONG minutes a round (5), SONG_SONG processes (every CPU
thread), PHUT_KIEM_TRA minutes of the final check (5; 0 skips it), UU_TIEN the processes'
priority (BELOWNORMAL; LOW or NORMAL).HAT_GIONG: the seed; the same seed plays the same games. A new tuning from scratch: delete the
spsa folder (or rename it).return {...} line of a previous ket-qua.txt into
spsa\bat-dau.lua before the first round.VONG=60, PHUT_VONG=10, PHUT_KIEM_TRA=15 — 60
rounds of 10 minutes, then a quarter of an hour of checking (on 24 threads, tens of thousands of games: the win rate
within about a point). The steps shrink over the rounds: more rounds, the further and the more surely the numbers
can go. Turn sleep off first (Settings → System → Power).spsa.bat, keep only that PC's mods. Two PCs on the same mod: set a
different HAT_GIONG on each (9000 and 19000), or they play the very same games.ket-qua.txt says so.SONG_SONG left as it is, spsa.bat runs fewer processes on a PC short of memory (a 16 GB
PC: 18), keeping about 4 GB for Windows. Still, look at Task Manager (Performance → Memory) after a quarter
of an hour; above about 85% in use, lower SONG_SONG.TIEP_HOC_SAU=1 (THEN_BRAIN=1 in the English kit) — once
the tuning is done (all rounds, the check, the numbers packed), spsa.bat runs hoc-sau.bat by
itself, so that XOI's brain learns on top of the numbers just tuned: the same mods, with hoc-sau.bat's own
settings. A hoc-sau folder of an earlier run is renamed hoc-sau-truoc (-2,
-3…) so that the new brain starts from scratch; a brain run left half way goes on when either file is run
again.VONG số vòng (12), PHUT_VONG số phút mỗi vòng (5), SONG_SONG số tiến trình (mọi
luồng CPU), PHUT_KIEM_TRA số phút kiểm tra cuối (5; 0 là bỏ qua), UU_TIEN mức ưu tiên của các
tiến trình (BELOWNORMAL; hoặc LOW, NORMAL).HAT_GIONG: hạt giống; cùng hạt giống thì đánh lại đúng những trận ấy. Chỉnh lại từ đầu: xóa (hoặc đổi tên) thư
mục spsa.return {...} của một ket-qua.txt cũ vào
spsa\bat-dau.lua trước vòng đầu.VONG=60, PHUT_VONG=10, PHUT_KIEM_TRA=15 —
60 vòng × 10 phút, rồi mười lăm phút kiểm tra (máy 24 luồng đánh được hàng chục nghìn trận: tỉ lệ thắng sai lệch khoảng
một điểm). Bước dịch nhỏ dần qua các vòng: càng nhiều vòng, các số càng đi được xa và càng chắc. Tắt chế độ ngủ trước
(Settings → System → Power).spsa.bat chỉ để các bản mod của máy ấy. Hai máy cùng một bản
mod: đặt HAT_GIONG khác nhau (9000 và 19000), không thì hai máy đánh y hệt nhau.ket-qua.txt có ghi lại.SONG_SONG thì máy ít bộ nhớ sẽ được spsa.bat tự bớt số tiến trình (máy 16 GB: 18), chừa
khoảng 4 GB cho Windows. Dù vậy, sau mười lăm phút nên mở Task Manager (Performance → Memory); dùng quá
khoảng 85% thì giảm SONG_SONG.TIEP_HOC_SAU=1 (bộ tiếng Anh: THEN_BRAIN=1) — chỉnh số xong (hết
các vòng, kiểm tra, gói số) thì spsa.bat tự chạy hoc-sau.bat, để bộ não XOI học trên bộ số vừa
chỉnh: cùng các bản mod, với cài đặt của chính hoc-sau.bat. Thư mục hoc-sau của một lần chạy
trước được đổi tên thành hoc-sau-truoc (-2, -3…) để bộ não mới học từ đầu;
hoc-sau đang dở thì chạy lại file nào cũng làm tiếp.Before every move XOI works out a score for it by hand-made rules: what the blow is worth, what it costs, how
likely the opponent answers first. From package 67 a small neural network — XOI's brain — can sit beside those
rules: given the situation (58 numbers: distances, speeds, both fighters' states, HP, MP, the move's damage, reach, MP and
kind…) it predicts what the move will bring, HP dealt minus HP taken over the next second and a half, and XOI weighs its own
score half with that prediction. The brain learns from XOI's own games, the way chess engines' NNUE networks learn from
theirs: hoc-sau.bat records every move XOI starts over thousands of games and what came of it, then trains the
network inside the game (a few minutes a million moves). A brain is made for one mod and travels with it as
xoi/brain.txt, like the notes and the numbers; the match shows brain beside XOI. Trained on Sauce's
pack ("lf2-AI VS and Stage Challenge"), it took XOI from 321 to 377 games won of 720 against Sauce's AI, and 216 to 134
against XOI without it; the same brain did nothing for other mods — each needs its own.
Trước mỗi đòn, XOI tính điểm cho đòn ấy bằng các luật đặt tay: đòn đáng bao nhiêu, tốn bao nhiêu, đối thủ
dễ đáp trước đến đâu. Từ gói 67, một mạng nơ-ron nhỏ — bộ não của XOI — có thể đứng cạnh các luật ấy: nhìn tình huống
(58 con số: khoảng cách, vận tốc, trạng thái hai bên, máu, MP, sát thương, tầm, MP và loại của đòn…) nó đoán đòn ấy sẽ mang
lại gì — máu gây được trừ máu mất trong một giây rưỡi sau — và XOI lấy một nửa điểm tự tính, một nửa lời đoán ấy. Bộ não học
từ chính các trận của XOI, như mạng NNUE của các chương trình cờ học từ các ván của chúng: hoc-sau.bat ghi lại
mọi lần XOI ra đòn trong hàng nghìn trận cùng kết quả, rồi huấn luyện mạng ngay trong game (vài phút cho một triệu lần ra
đòn). Bộ não làm cho một bản mod và đi cùng bản mod ấy dưới tên xoi/brain.txt, như bộ nhớ và bộ số; trong trận
ghi brain cạnh XOI. Học trên bản của Sauce ("lf2-AI VS and Stage Challenge"), nó đưa XOI từ 321 lên 377 trận thắng
trong 720 trận đấu AI của Sauce, và thắng XOI không có bộ não 216–134; cũng bộ não ấy không giúp gì cho các bản mod khác —
mỗi bản mod cần bộ não riêng.
.zip next to hoc-sau.bat, or drag one onto it. The original or the
<mod>-xoi.zip that spsa.bat or xoi-hoc.bat made both do (package 68 on): XOI records
with the mod's numbers and notes — those of xoi-<mod>\ beside the file when it exists, else those inside
the zip — so the brain learns the XOI that actually plays the mod; a -xoi.zip beside its original is skipped
when the folder is scanned, and its brain lands in the same xoi-<mod>\. Several mods: the processes are
shared among them and each mod gets a brain of its own.PHUT_GHI minutes: XOI against
the mod's own AI scripts where it has them (Sauce's AI), else against itself; random pairs of the mod's fighters on random
stages. The data of every round so far is gathered, a brain is trained for each mod, and from the second round XOI records
with the brain it just learned, so the brain learns its new play too. A process records about 2,000 moves a minute: 2
rounds of 20 minutes on 80 threads is some 6 million moves (2.5 GB of data) and about an hour of training.PHUT_KIEM_TRA minutes, same seeds: the win rates stand side by side in
hoc-sau\ket-qua.txt. To pause, close the windows; double-click again to go on (recorded data is kept).
To learn further, raise VONG and run again: it goes on from the next round with all the data so far
(package 75: after a finished run, the added rounds record with the new kit's scripts — the new AI).
Start over by deleting the hoc-sau folder. Your own settings go in hoc-sau-cai-dat.bat beside it
(brain-settings.bat in the English kit), as with spsa.bat.xoi-<mod>\brain.txt, and <mod>-xoi.zip is the mod
with it inside (xoi/brain.txt beside its data folder, with the mod's numbers and notes if it has
them; a -xoi.zip given is updated itself, the earlier one kept as -xoi-truoc.zip). Uploaded to the
relay or published, XOI plays that mod with the brain. Upload it only if the check has XOI with
the brain winning more than XOI without it. spsa.bat, xoi-hoc.bat and xuat-ban.bat
pack the brain too when xoi-<mod>\brain.txt exists.hoc-sau\ket-qua.txt to whoever maintains the AI: the data each round, how well the network
predicts (the corr figures: how its predictions go with what happened, where the hand-made score alone gets
about 0.2 and the network about 0.45), and the check..zip bản mod cạnh hoc-sau.bat, hoặc kéo thả một file vào nó. Bản gốc
hay bản <tên>-xoi.zip mà spsa.bat/xoi-hoc.bat làm ra đều được (từ gói 68): XOI ghi dữ
liệu với bộ số và bộ nhớ của bản mod — lấy trong xoi-<tên>\ cạnh file nếu có, không thì trong file zip — nên
bộ não học đúng XOI đang chơi bản mod ấy; file -xoi.zip nằm cạnh bản gốc thì bị bỏ qua khi tự quét thư mục,
và bộ não của nó về cùng xoi-<tên>\. Nhiều bản mod: các tiến trình chia nhau, mỗi bản mod một bộ não riêng.PHUT_GHI phút: XOI đánh với AI
riêng của bản mod nếu có (AI của Sauce), không thì với chính nó; các cặp nhân vật ngẫu nhiên trên sân ngẫu nhiên. Dữ liệu
của mọi lượt từ trước tới giờ được gộp, mỗi bản mod được huấn luyện một bộ não, và từ lượt hai XOI ghi dữ liệu với bộ não vừa
học, nên bộ não học được cả cách chơi mới của nó. Một tiến trình ghi chừng 2.000 lần ra đòn mỗi phút: 2 lượt × 20 phút trên
máy 80 luồng được chừng 6 triệu lần ra đòn (2,5 GB dữ liệu), huấn luyện chừng một giờ.PHUT_KIEM_TRA phút, cùng hạt giống: hai tỉ lệ thắng đứng cạnh nhau trong hoc-sau\ket-qua.txt.
Tạm dừng: đóng các cửa sổ; nháy đúp lại là làm tiếp (dữ liệu đã ghi được giữ). Học thêm: tăng VONG
rồi chạy lại — làm tiếp từ lượt kế với tất cả dữ liệu đã có (gói 75: đợt trước đã xong thì các lượt thêm ghi dữ liệu với
scripts của bộ XOI mới, AI bản mới). Làm lại từ đầu: xóa thư mục hoc-sau. Cài đặt riêng
của bạn để trong hoc-sau-cai-dat.bat cạnh nó (bộ tiếng Anh: brain-settings.bat), như với
spsa.bat.xoi-<tên>\brain.txt, và <tên>-xoi.zip là bản
mod có nó bên trong (xoi/brain.txt cạnh thư mục data, kèm bộ số và bộ nhớ của bản mod nếu đã có;
đưa vào chính bản -xoi.zip thì nó được cập nhật tại chỗ, bản trước giữ ở -xoi-truoc.zip).
Tải lên relay hay xuất bản thì XOI chơi bản mod ấy với bộ não. Chỉ tải lên khi phần kiểm tra cho XOI có bộ não thắng nhiều
hơn XOI không có. spsa.bat, xoi-hoc.bat và xuat-ban.bat cũng đóng gói bộ não khi có
xoi-<tên>\brain.txt.hoc-sau\ket-qua.txt cho người làm AI: dữ liệu từng lượt, mạng đoán tốt đến đâu (các số corr:
lời đoán đi cùng kết quả thật đến mức nào — điểm tự tính của XOI được khoảng 0,2, mạng khoảng 0,45), và phần kiểm tra.VONG rounds (2), PHUT_GHI minutes of recording a round (20), SONG_SONG processes
(every CPU thread; fewer on a PC short of memory, as spsa.bat does), PHUT_KIEM_TRA minutes of the
final check (10; 0 skips it), UU_TIEN the processes' priority, HAT_GIONG the seed.AN neurons in the middle layer (96 from package 82; 48 before) and EPOCH passes over the data
(8): enough; more takes longer to train. Training takes about half a GB of memory per million moves (six million: 3 GB;
package 82's moves of 88 numbers about 750 MB a million, four million at most) and a few minutes a million moves a
pass, one process per mod.hoc-sau\du-lieu\
(about 2.5 GB for 6 million moves) and the training packs are deleted once trained.spsa.bat does. DOI_THU=xoi (package 71; OPPONENT=xoi in the English
brain.bat) does so in a mod with AI scripts of its own too, the check included: most mods' own AI is far
weaker than XOI (Dragon Ball Super's loses most of its games to it), and a brain learned against it only learns to beat it.
Leave it empty for Sauce's pack. From package 67 to 78 the copy played with the brain too (a fault of the recording job):
the check set the brain against itself, about even whatever the brain was worth. A brain learned so is sound — delete
hoc-sau\kiem-tra and run the new kit's hoc-sau.bat again to check it (only the check runs).THU_DON (package 79; EXPLORE in the English brain.bat), 4: while recording,
XOI now and then starts a move other than the one it finds best — moves scoring close to the best one often, moves far
below it almost never — so that the brain learns what the moves XOI seldom picks bring too, not only those it always
picks. 0 turns it off; the check never explores. Mode Convergence, XOI against itself, one round of 25 minutes on
2 threads: the brain learned so won 6.5 games in 100 more than XOI without a brain, the one learned without exploring
2.9 (the same 2,000 games). Against Sauce's AI it made no difference (about 8 games in 100 either way): an opponent unlike XOI already shows the brain enough.NHIN_XA (package 81; LOOK_AHEAD in the English brain.bat): the seconds after a move
whose outcome the brain predicts — 1,5 (the default), 3 or 5; or tu
(auto): three brains, 1.5 / 3 / 5 seconds, learned from the same data, all three played in the check, and
each mod keeps the one that won most. Looking further, the brain sees a combo's opening move or a push into the
corner, but the outcome holds more of what that move did not do; on mode Convergence the three won 4.1 / 6.1 / 5.1
games in 100 more than XOI without a brain, within chance of each other. Auto trains three brains at once a mod
(three times the memory) and splits the check four ways: worth it on many threads (some 40 or more) or with a
longer PHUT_KIEM_TRA. A hoc-sau folder records with one NHIN_XA: rename it to
change.xoi-<mod>\brain.txt, or the zip's own) and
keeps it when the new one does not win more — nothing is packed then, nothing changes. A hoc-sau folder
of package 81 or older (58-number data) cannot go on: rename it first (the kit says so).spsa.bat, then hoc-sau.bat: the brain learns on top of the numbers (the
hand-made score is one of its inputs), so after a new tuning a few more rounds bring it up to date. The project owner's
10 rounds on Sauce's pack (80 threads, November 2026): XOI with the brain won 57.4% of its games against Sauce's AI,
XOI without it 45.8%.hoc-sau folder keeps each mod's data by its place in the run
(mod 1, mod 2...). To run other mods, rename it first (hoc-sau-sauce, say); from package 71
hoc-sau.bat stops with a message rather than mix their data.VONG số lượt (2), PHUT_GHI số phút ghi dữ liệu mỗi lượt (20), SONG_SONG số tiến trình
(mọi luồng CPU; máy ít bộ nhớ được tự bớt, như spsa.bat), PHUT_KIEM_TRA số phút kiểm tra cuối (10; 0 là
bỏ qua), UU_TIEN mức ưu tiên, HAT_GIONG hạt giống.AN số nơ-ron lớp giữa (96 từ gói 82; trước đó 48) và EPOCH số lần học qua toàn bộ dữ liệu (8): đủ
dùng; lớn hơn thì huấn luyện lâu hơn. Huấn luyện tốn chừng nửa GB bộ nhớ cho mỗi triệu lần ra đòn (6 triệu: 3 GB; lần ra
đòn 88 số của gói 82 chừng 750 MB mỗi triệu, nhiều nhất 4 triệu) và vài phút cho mỗi triệu mỗi lần học, mỗi bản mod một
tiến trình.hoc-sau\du-lieu\ (chừng 2,5 GB cho 6 triệu lần) và các gói huấn luyện được xóa sau khi học xong.spsa.bat. DOI_THU=xoi (gói 71; bộ tiếng Anh: OPPONENT=xoi trong
brain.bat) làm vậy cả ở bản mod có script AI riêng, cả phần kiểm tra: AI riêng của phần lớn bản mod yếu hơn
XOI nhiều (AI của Dragon Ball Super thua XOI phần lớn số trận), và bộ não học đánh AI ấy chỉ học được cách thắng nó. Bản
Sauce thì để trống. Từ gói 67 tới 78 bản sao ấy lại chơi cùng bộ não (lỗi của bước ghi dữ liệu): phần kiểm tra là bộ
não đấu với chính nó, gần như hòa dù bộ não tốt hay dở. Bộ não đã học vẫn dùng được — xóa hoc-sau\kiem-tra
rồi chạy hoc-sau.bat của bộ mới để kiểm tra lại (chỉ phần kiểm tra chạy).THU_DON (gói 79; bộ tiếng Anh: EXPLORE trong brain.bat), 4: khi ghi dữ liệu, XOI
thỉnh thoảng thử một đòn khác với đòn nó cho là tốt nhất — đòn điểm gần bằng thì hay được thử, đòn kém xa thì gần như
không — để bộ não biết cả những đòn XOI ít chọn mang lại gì, không chỉ những đòn nó luôn chọn. 0 là tắt; phần kiểm tra
không bao giờ thử đòn. Convergence, XOI tự đánh với chính nó, 1 lượt 25 phút trên 2 luồng: bộ não học như vậy thắng
nhiều hơn XOI không có bộ não 6,5 trận mỗi 100 trận, bộ não học không thử đòn 2,9 (cùng 2.000 ván). Với AI của Sauce thì như nhau (thử đòn hay không đều chừng 8 trận mỗi 100): một đối thủ khác XOI đã cho bộ não đủ điều để học.NHIN_XA (gói 81; bộ tiếng Anh: LOOK_AHEAD trong brain.bat): số giây sau mỗi đòn mà
bộ não đoán kết quả — 1,5 (mặc định), 3 hay 5; hoặc tu: từ cùng dữ
liệu học ba bộ não 1,5 / 3 / 5 giây, phần kiểm tra cho cả ba đánh và mỗi bản mod giữ bộ não thắng nhiều nhất. Nhìn
xa thì bộ não thấy cả đòn mở đầu combo hay đòn dồn đối thủ vào góc, nhưng kết quả lẫn nhiều thứ không do đòn ấy gây
ra hơn; trên Convergence ba bộ não thắng hơn XOI không có bộ não 4,1 / 6,1 / 5,1 trận mỗi 100, chênh nhau còn trong
dao động. Tự chọn thì huấn luyện ba bộ não cùng lúc mỗi bản mod (gấp ba bộ nhớ) và phần kiểm tra chia bốn: đáng dùng
khi máy nhiều luồng (chừng 40 trở lên) hay PHUT_KIEM_TRA dài hơn. Một thư mục hoc-sau ghi
theo một NHIN_XA: muốn đổi thì đổi tên thư mục ấy.xoi-<tên>\brain.txt, hay bộ não trong file zip) và giữ nguyên nó khi bộ mới không thắng nhiều hơn —
không gói gì, không đổi gì. Thư mục hoc-sau của gói 81 trở về trước (dữ liệu 58 số) không chạy tiếp được:
đổi tên nó trước (kit sẽ báo).spsa.bat trước rồi mới hoc-sau.bat: bộ não học trên nền bộ số (điểm tự tính là một
đầu vào của nó), nên chỉnh số lại thì chạy thêm vài lượt cho bộ não theo kịp. Lần chạy 10 lượt của chủ dự án trên bản
Sauce (80 luồng, tháng 11/2026): XOI có bộ não thắng 57,4% số trận với AI của Sauce, không có 45,8%.hoc-sau giữ dữ liệu của từng bản mod theo thứ tự của nó trong
lần chạy (bản mod 1, bản mod 2...). Chạy cho các bản mod khác thì đổi tên nó trước (ví dụ hoc-sau-sauce);
từ gói 71 hoc-sau.bat dừng và báo thay vì trộn dữ liệu của chúng.The kit and OpenLF2's installer are for you, who train. Your mod's players need neither:
xuat-ban.bat gives them your mod's own folder as you share it (bg, bgm,
data, sprite… and its own .exe) with OpenLF2 put in it, XOI's notes, numbers and brain in
xoi\. They extract it and double-click <mod> - INSANE XOI.exe — every level up to INSANE! and
XOI, no OpenLF2 to install, no kit, no original LF2. OpenLF2 plays the mod folder it lies in by itself (from package 50;
xuat-ban.bat checks the installed one and says when it is older).
Bộ XOI và bộ cài OpenLF2 là cho bạn, người huấn luyện. Người chơi bản mod của bạn không cần cả hai:
xuat-ban.bat đưa họ nguyên thư mục gốc của bản mod như bạn chia sẻ (bg, bgm,
data, sprite… và cả file .exe của nó), thêm OpenLF2 vào, bộ nhớ, bộ số và bộ não của XOI trong
xoi\. Họ giải nén rồi nháy đúp <tên> - INSANE XOI.exe — đủ các mức tới INSANE! và XOI, không
cài OpenLF2, không cần bộ XOI, không cần LF2 gốc. OpenLF2 tự chơi thư mục bản mod mà nó nằm trong (từ gói 50;
xuat-ban.bat kiểm tra bản đã cài và báo nếu nó cũ hơn).
<mod>-xoi.zip, the mod with xoi\notes.txt and xoi\tune.txt inside. Untrained,
XOI still plays, with its general numbers and no notes.<mod>-xoi.zip next to xuat-ban.bat (or the mod's zip or folder: the notes and
numbers in xoi-<mod>\ beside it go in), or drag it onto xuat-ban.bat. The name players see
is the mod's; another: TEN at the top of the file. Your words for them — what the mod is, who made it — go
into xuat-ban-README.txt beforehand ({TEN} becomes the name, {EXE} the program,
{GOC} the mod's own .exe).xuat-ban.bat asks (C = yes, K = no; or set KHOA_AN at
the top). Yes: the players' title screen has no options, the hidden fighters cannot be unlocked and typing
lf2.net does nothing — for a mod whose hidden fighters are out of balance. CRAZY!, INSANE! and XOI
can still be chosen (from package 49; they otherwise come with the unlock). It is a file in the mod,
openlf2.txt (hidden_characters = locked, options = hidden), which OpenLF2 reads
from package 48 on.xuat-ban.bat. It copies the mod's folder (from its zip, or the folder you gave),
puts in the installed OpenLF2 (the program as <mod> - INSANE XOI.exe, its libraries, its scripts — the
kit's when newer, the computer players you trained with — and its licences) and
README - INSANE XOI.txt, starts the folder once without a window to see that it plays the mod by itself, and
zips it.xuat-ban\<mod>.zip. xuat-ban\<mod>\ is the same, unzipped: try it
first.<tên>-xoi.zip, bản mod có xoi\notes.txt và xoi\tune.txt bên trong. Chưa huấn
luyện thì XOI vẫn chơi, bằng bộ số chung và không có bộ nhớ.<tên>-xoi.zip cạnh xuat-ban.bat (hoặc file zip hay thư mục bản mod: bộ nhớ và
bộ số trong xoi-<tên>\ cạnh nó được đóng vào), hoặc kéo thả nó vào xuat-ban.bat. Tên người
chơi thấy là tên bản mod; muốn tên khác: dòng TEN ở đầu file. Lời của bạn cho người chơi — bản mod là gì, ai
làm — viết trước vào xuat-ban-README.txt ({TEN} thành tên bản xuất bản, {EXE}
thành file chương trình, {GOC} thành file .exe gốc của bản mod).xuat-ban.bat hỏi (C = có, K = không; hoặc đặt dòng KHOA_AN ở đầu
file). Có: màn hình đầu của người chơi không có nút options, nhân vật ẩn không mở khóa được, gõ
lf2.net cũng không mở — cho bản mod có nhân vật ẩn mất cân bằng. CRAZY!, INSANE! và XOI vẫn chọn được
(từ gói 49; bình thường chúng đi cùng việc mở khóa). Đó là một file trong bản mod,
openlf2.txt (hidden_characters = locked, options = hidden), OpenLF2 đọc từ gói
48.xuat-ban.bat. Nó chép thư mục bản mod (từ file zip, hoặc thư mục bạn đưa), thêm OpenLF2
đã cài (chương trình thành <tên> - INSANE XOI.exe, các thư viện, scripts — của bộ XOI nếu mới hơn, tức
các máy bạn đã huấn luyện — và giấy phép) và README - INSANE XOI.txt, mở thử thư mục một lần không cửa sổ
để chắc nó tự chơi được bản mod, rồi nén lại.xuat-ban\<tên>.zip. xuat-ban\<tên>\ là bản đã giải nén: chơi thử
trước.licenses\ when you pass the folder on: OpenLF2 is MIT-licensed and its libraries ask for their
licences to travel with them.%APPDATA%\OpenLF2, shared with an installed OpenLF2.
Windows protected your PC on first start: More info, Run anyway (the program is not signed)..exe is packed or protected (Naruto: The Setting Dawn's NTSD.exe, say) has its
pictures where OpenLF2 cannot read them: xuat-ban.bat stops with the game's words, nothing made.game.zip beside it,
as published before package 50) whenever it is started without --pack or --installer.licenses\ khi chia sẻ: OpenLF2 theo giấy phép MIT, và các thư viện của nó yêu cầu giấy
phép đi kèm.%APPDATA%\OpenLF2, chung với OpenLF2 nếu máy có cài.
Lần đầu mở mà Windows báo Windows protected your PC: More info, Run anyway (chương trình chưa ký số)..exe bị nén hay khóa (ví dụ NTSD.exe của Naruto: The Setting Dawn) để hình
ở chỗ OpenLF2 không đọc được: xuat-ban.bat dừng, in lời báo của game, không làm gì.game.zip nằm cạnh
nó, như bản xuất bản trước gói 50) mỗi khi được mở mà không có --pack hay --installer.The notes file is plain text, one fact per line, each starting with XOI: G the
games of a pair, R the opponent's answers to risky moves, M a move's record against an opponent,
C its record by situation, P the spots the fighter stood on. A big mod's notes run to megabytes; in a match
the game reads only the lines of the pairs in it. Elsewhere than Windows, the same jobs run from a shell:
openlf2 --pack mod.zip --mod tools/ai-bench with a config.lua such as
return {command = "learn", games = 100, ids = "all"} — see
tools/ai-bench/README.md.
File bộ nhớ là chữ thường, mỗi dòng một điều, bắt đầu bằng XOI: G số trận của
một cặp, R cách đối thủ đáp lại chiêu liều, M thành tích một chiêu trước một đối thủ, C thành
tích ấy theo hoàn cảnh, P các chỗ nhân vật đã đứng. Bộ nhớ của bản mod lớn có thể tới vài MB; trong trận, game chỉ đọc
các dòng của những cặp có mặt. Ngoài Windows, cùng các việc này chạy bằng dòng lệnh:
openlf2 --pack mod.zip --mod tools/ai-bench với config.lua như
return {command = "learn", games = 100, ids = "all"} — xem
tools/ai-bench/README.md.
The .bat files speak Vietnamese without accents; here is what their messages mean.
Các file .bat in thông báo tiếng Việt không dấu; dưới đây là cách xử lý.
| Message or problem | What to do |
|---|---|
Chua cai OpenLF2, Khong thay game | Install OpenLF2 (above); installed elsewhere: set GAME to the full path of openlf2.exe. |
Khong thay ban mod, Khong thay file zip ban mod | Put the mod's .zip next to the .bat file, or drag it onto it. |
... khong phai file zip | A .rar or .7z: extract it (7-Zip) and drag the folder onto choi.bat. |
khong co data/data.txt | Not an LF2 game folder: pick the folder that has data\data.txt (where the mod's .exe is). |
| The difficulty never goes past Difficult | The hidden content is locked: on the start screen open Options and tick Unlock hidden characters, or type lf2.net. |
| The game window stays blue or black | VE=software at the top of choi.bat. Started some other way, OpenLF2 from version 29 of this build checks by itself that its renderer shows pictures and changes it when not. |
| Windows protected your PC | More info, then Run anyway. |
[LOI] Khong dong goi duoc | PowerShell is blocked on this PC. By hand: open the mod's zip (7-Zip), go into the folder that has data, and drag in the folder xoi-<mod>\goi\xoi. |
[LOI] OpenLF2 da cai ... la ban cu | xuat-ban.bat: the installed OpenLF2 does not yet play the mod folder it lies in (package 50 on). Install the latest (above) and run it again. |
[LOI] Ban xuat ban khong mo duoc ban mod | The game could not open the mod (its words are above, and in xuat-ban\<mod>-kiem-tra.txt). A packed or protected .exe cannot be published; otherwise send that file. |
[CHU Y] Co hinh game khong doc duoc | xuat-ban.bat published the mod, but the game leaves out the pictures listed (as it does with choi.bat). An older OpenLF2: install the latest, which reads more kinds of pictures, and publish again. |
[LOI] ...\pN chua xong hoac co loi | A training window was closed or failed: the pairs it finished are kept; the lines with ERROR say why. |
Dot hoc voi hat giong ... da co | That round exists: change HAT_GIONG_DAU, or run xoi-hoc.bat gop to merge only. |
| The PC crawls while training | Lower SONG_SONG (half the threads, say). |
An antivirus warns about a .bat | The .bat and .ps1 files are plain text: open them in Notepad to read every line. |
| Thông báo hay hiện tượng | Cách xử lý |
|---|---|
Chua cai OpenLF2, Khong thay game | Cài OpenLF2 (ở trên); cài ở chỗ khác thì đặt GAME là đường dẫn đầy đủ tới openlf2.exe. |
Khong thay ban mod, Khong thay file zip ban mod | Đặt file .zip bản mod cạnh file .bat, hoặc kéo thả nó vào. |
... khong phai file zip | File .rar hay .7z: giải nén (7-Zip) rồi kéo thư mục vào choi.bat. |
khong co data/data.txt | Không phải thư mục game LF2: chọn thư mục có data\data.txt (nơi có file .exe của bản mod). |
| Mức khó không qua được Difficult | Nội dung ẩn đang khóa: ở màn hình khởi động mở Options, tích Unlock hidden characters, hoặc gõ lf2.net. |
| Cửa sổ game chỉ xanh hay đen | VE=software ở đầu choi.bat. Mở game theo cách khác thì OpenLF2 từ bản 29 của bản dựng này tự kiểm tra cách vẽ có hiện hình không và tự đổi khi không. |
| Windows protected your PC | More info, rồi Run anyway. |
[LOI] Khong dong goi duoc | Máy chặn PowerShell. Làm tay: mở file zip bản mod (7-Zip), vào thư mục có data, kéo thư mục xoi-<tên>\goi\xoi vào đó. |
[LOI] OpenLF2 da cai ... la ban cu | xuat-ban.bat: OpenLF2 đã cài chưa tự chơi thư mục bản mod mà nó nằm trong (cần từ gói 50). Cài bản mới nhất (ở trên) rồi chạy lại. |
[LOI] Ban xuat ban khong mo duoc ban mod | Game không mở được bản mod (lời báo của game in ở trên, và trong xuat-ban\<tên>-kiem-tra.txt). File .exe bị nén hay khóa thì không xuất bản được; còn lại thì gửi file ấy. |
[CHU Y] Co hinh game khong doc duoc | xuat-ban.bat vẫn xuất bản, nhưng game bỏ qua các hình được liệt kê (như khi chơi bằng choi.bat). OpenLF2 bản cũ: cài bản mới nhất (đọc được nhiều kiểu hình hơn) rồi xuất bản lại. |
[LOI] ...\pN chua xong hoac co loi | Một cửa sổ huấn luyện bị đóng hoặc lỗi: những cặp nó đã xong vẫn được giữ; các dòng có ERROR cho biết lý do. |
Dot hoc voi hat giong ... da co | Đợt đó đã có: đổi HAT_GIONG_DAU, hoặc chạy xoi-hoc.bat gop để chỉ gộp. |
| Máy rất chậm khi huấn luyện | Giảm SONG_SONG (ví dụ một nửa số luồng). |
Phần mềm diệt virus cảnh báo file .bat | Các file .bat và .ps1 là chữ thường: mở bằng Notepad để đọc từng dòng. |