Skip to content

iBO: Interactive Bayesian Optimization (2.0.0) - #27

Merged
Pascal-Jansen merged 19 commits into
mainfrom
ibo-restructure
Oct 29, 2026
Merged

Pascal-Jansen merged 19 commits into
mainfrom
ibo-restructure

Conversation

@Pascal-Jansen

@Pascal-Jansen Pascal-Jansen commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Renames Bayesian Optimization for Unity to iBO (Interactive Bayesian Optimization), version 2.0.0, and makes it engine-independent:

  • Shared Python optimizer in Backend/ with generated copies for Unity and Unreal (layout of Bayesian-Optimization-for-Game-Engines), plus the Unreal plugin.
  • Open iBO protocol (protocol/), Python client and server launcher (Python/, ibo demo, ibo serve).
  • Unity package in Unity/Assets/iBO; QuestionnaireToolkit as an optional add-on.
  • Dependencies: torch 2.15.0, pandas 3.1.0; CI on actions/setup-python v7 and Python 3.15.
  • README with logo, role and behavior animations from recorded iBO runs, and a migration guide (docs/migration-to-ibo.md).

Version 1.9.1 stays available in the BOforUnity branch and as release v1.9.1. There was no iBO 1.x: the version numbers continue those of Bayesian Optimization for Unity.

Tested locally:

  • backend tests, including real optimizers on the pinned stack;
  • Python client with real studies;
  • Unreal launcher tests;
  • Unity 6000.4.7: compiles cleanly, 48/48 EditMode tests.

Not yet tested: the package in Unity 6000.6 and Unreal Engine 5.8.

Pascal-Jansen and others added 19 commits October 28, 2026 13:43
AssetStore/ builds a clean upload project from the repository and checks it against the
submission guidelines (single root folder, no executables, offline documentation, notices).

Fixes the package code the guidelines would reject:
- namespaces for ColorGuesser, ColorWheelMarker and QTManagerEditor; QuestionnaireToolkit's
  Ludiq.* editor namespaces renamed
- no reflection into internal Editor APIs (DropdownGUI, ReorderableList)
- QuestionnaireToolkit editors find their textures wherever the folder lives
- version-guarded replacements for obsolete TMP, FindObjects*, scripting-define and
  CanCacheInspectorGUI APIs
- QuestionnaireToolkit registers its tags when the editor loads it, so opening the example
  scenes in a fresh project logs no "Tag ... is not defined" errors
- PythonStarter explains how to install Python 3.13 when no bundled installer is present

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ibo_server.py picks the backend from the init message and runs it on the accepted
  connection (bo_protocol.adopt_connection); BO_PORT selects the port
- protocol/: the existing Unity <-> Python wire protocol written down as IBO protocol v1,
  with a JSON schema
- core/: interactive_bo, a standard-library Python client, a server launcher and
  `python -m interactive_bo serve|demo`
- tests for the server, hand-over, client, launcher and schema; end-to-end studies with the
  real backends when IBO_TEST_PYTHON is set; both in CI
- docs/ibo/ROADMAP.md: plan for Interactive Bayesian Optimization (IBO)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move, no content changes, so file history follows (git log --follow). Prepares the
multi-engine layout: Backend/, Unity/, Unreal/ and the Python client side by side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in Mark Colley's restructure (M-Colley/Bayesian-Optimization-for-Game-Engines f1dd135):
- Backend/: the canonical Python optimizer; tools/sync_backends.py generates the Unity and
  Unreal copies and CI verifies them
- Unity/: core without QuestionnaireToolkit (integration contracts in BOforUnity.Shared),
  BayesianOptimization namespaces, analytic and rendering samples, URP/HDRP support
- Unreal/: C++ plugin with a Blueprint component, protocol tests and a Python launcher
- tests/, tools/, docs/: shared Python tests, release packaging, validation record
- configurable BO_PORT, optional botorch-rust model library (bo_library.py)

Kept from this repository for the QuestionnaireToolkit add-on (wired up in a later commit):
Unity/Assets/QuestionnaireToolkit and the questionnaire example scenes, prefabs and loading
frames. Dropped as in the new layout: the bundled Python installers and their scripts,
TextMesh Pro essentials (imported on demand), UI Toolkit settings and stray project settings.
.gitattributes now normalizes text files to LF.

Co-Authored-By: Mark Colley <39366189+M-Colley@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Backend/ibo_server.py and the connection hand-over in Backend/bo_protocol.py (on top of the
  validated BO_PORT); tools/sync_backends.py copies both into the Unity and Unreal backends
- core/ becomes Python/, next to Backend/, Unity/ and Unreal/; the launcher defaults to
  Backend/ and finds InitData/MetaSources in Backend/ or next to an engine copy
- protocol/README.md: file locations in the new layout, Unreal client, BO_MODEL_LIBRARY
- CI: Python client tests in the stub job, end-to-end studies in the full-stack job
- docs/ibo/ROADMAP.md: decisions and status after the merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FindObjectsSortMode is deprecated from Unity 6000.4 (not 6000.6), so 6000.4 and 6000.5 compiled
FittsLawTask and StudyQuestionnaires with obsolete-API warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unity/Assets/IBO-QuestionnaireToolkit holds QuestionnaireToolkit and the questionnaire examples
(BO-example-scene, single-objective color demo, click game, Fitts's law study, their prefabs and
loading frames). The core package does not need it.

- QuestionnaireToolkit references BOforUnity.Shared and uses its IQuestionnaireOptimizationBridge
  and LogDataFolderUtility instead of its own copies
- QTQuestionnaireManager implements IStudyQuestionnaire (SliderHeaderNames, context IDs), so the
  examples drive it through the shared contract
- tools/build_packages.py leaves the add-on out of the core Unity artifacts (test added)

Checked in a fresh Unity 6000.4.7 project: no compiler errors or warnings from package code, no
missing scripts in the 9 scenes and 29 prefabs, 48 EditMode tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: IBO across Unity, Unreal and Python; the Unity manual of 1.8 moves to
  docs/unity-manual.md, with a note on what changed
- docs/migration-to-ibo.md for projects using Bayesian Optimization for Unity 1.x
- Unity package folder Assets/BOforUnity -> Assets/IBO (GUIDs unchanged); menus Tools > IBO;
  generated assets in Assets/IBOGenerated; release artifacts IBO-Unity-*, IBO-Unreal-*
- Unreal plugin display name "Interactive Bayesian Optimization (IBO)" (module unchanged)
- CITATION.cff, notices, CHANGELOG [Unreleased], roadmap; the release workflow bumps
  Unity/ProjectSettings, VERSION and CITATION.cff
- the QuestionnaireToolkit add-on carries its own third-party notices (three items still open);
  the Asset Store kit for the old layout is removed (tools/build_packages.py packages releases)

Kept for authored projects: namespaces BayesianOptimization.*, class and assembly names, the
Unreal module name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project name is written iBO (Interactive Bayesian Optimization) in documentation, folder
names (Unity/Assets/iBO, Unity/Assets/iBO-QuestionnaireToolkit), menus (Tools > iBO), generated
assets (Assets/iBOGenerated), release artifacts (iBO-Unity-*, iBO-Unreal-*), the Unreal plugin
display name and the backend's messages. Environment variables (IBO_BACKEND_DIR,
IBO_TEST_PYTHON) and lowercase identifiers (ibo_server.py, the ibo command, interactive-bo) keep
their conventional case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After `pip install ./Python`, the launcher looked for Backend/ next to the installed package in
site-packages, so `ibo demo` failed. It now tries IBO_BACKEND_DIR, then the repository the
package lives in (source checkout or editable install), then Backend/ in the current folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Python package 2.0.0rc1 (was 0.1.0.dev0)
- Unity bundleVersion 2.0.0-rc.1 (was 1.0) and productName iBO (was "Unity"; it names the
  persistentDataPath folder that holds the private Python environment)
- the release workflow bumps VERSION, CITATION.cff, the Python package, the Unreal plugin's
  VersionName and Unity's bundleVersion together

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- title, purpose, badges (Unity, Unreal Engine, Python, BoTorch, license, DOI, CI)
- overview graphic in light and dark variants: integrations, protocol, backend methods and the
  human-in-the-loop cycle (tool icons from Simple Icons, CC0)
- at-a-glance table, validation status, quick start for Unity, Unreal and Python
- README for the QuestionnaireToolkit add-on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Documentation
- Unity manual: installation (install Python 3.13 yourself, Unity 6000.6, open Unity/), Python
  Settings (no bundled runtime; new Optimizer TCP Port), Model Library setting, scene, script and
  prefab paths (add-on and Assets/iBO), warm-start folder (BOData/InitData), the manager tag is
  no longer needed, export instructions, product name and citation
- DBO and MetaTAF guides, standalone bridge: Backend/ as the source of dbo_torch and meta_train,
  links into the manual, product name
- protocol: the Unity and Unreal integrations both stop on unknown server messages
- Python guide: install, Python 3.9+ for the client, command line; add-on: not in release
  packages until its license items are resolved

Release and CI
- the release workflow accepts pre-releases (X.Y.Z-rc.N, -beta.N, -alpha.N), writes the Python
  version in PEP 440 form, runs every test suite and the backend sync check, and attaches the
  Unity and Unreal ZIP packages (the .unitypackage needs a Unity editor and stays manual)
- CI runs the Python client tests on Python 3.9 and 3.10, the range it supports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The botorch-rust model library, RunInfo.json and the botorch-rust pin
already came with the shared backend, so Backend/, the engine copies, the
Unity scripts and the tests keep the branch's versions. main's README
section 8.16 (model library) and its references move into
docs/unity-manual.md; the changelog keeps the iBO notes under
[Unreleased] above the 1.9.1 and 1.9.0 releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unity: the core has its own link.xml again; the editor tools find the
package folder by its GUID; the questionnaire prefab and showcase scenes
save to LogData instead of the old QuestionnaireToolkit folder; the
unused BOforUnityManager tag and stale UnityEvent type names are gone;
installer texts no longer point to the removed scripts.

Tools: build_packages.py packs only tracked files; sync_backends.py
creates and checks the Unity .meta files of the backend copy and skips
the embedding cache; the release workflow sets the Unreal beta flag and a
test keeps version files and license copies in step; the rendering
validation script uses the iBO paths; the ibo CLI reports errors without
a traceback and checks the port.

Docs: correct upgrade steps in the migration guide (Unity updates files
by GUID in place), Unity and add-on READMEs for use in one's own project,
protocol defaults and port, the pinned openbo commit, the integration
checklist, the validation record for 2.0.0-rc.1, and a README with
sections on own projects, choosing an optimizer, logs, platforms and
contributing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PythonStarter: drop the bundled Python installer step (iBO ships no
  installers, so it could only report that none was found); without a
  Python 3.13 the setup now fails with the same instructions directly.
  BoInstallationBuildPostprocessor, which pruned those installers from
  player builds, is gone as well.
- Remove the 1.0.0 package in release/ (96 MB), the unreferenced demo
  video (60 MB) and images, two unused QuestionnaireToolkit textures and
  two unused rendering sample materials.
- Keep each document once: validation record in docs/, render pipeline
  support and publication status in the Unity package documentation;
  remove the duplicate release exporter in tools/unity.
- A test now also keeps the license and third-party notice copies of the
  separately installed parts identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ixes

README
- "How iBO works": the study loop, sampling and optimization, and three
  animations (light and dark) drawn from recorded iBO runs with simulated
  participants: one parameter, two conflicting goals with their best
  trade-offs, and a drifting optimum with DBO and standard BO. A reader
  test without context shaped their labels and captions.
- Publications as a table with venue, paper and what was optimized.
- tools/readme_figures runs the studies and draws the animations and the
  overview figure, so all README figures can be regenerated.

Fixes from a review of the previous two commits
- Migration guide: keep the user's InitData, MetaSources and offline
  wheels instead of deleting everything in BOData except LogData.
- The last questionnaire showcase scene saved to /QuestionnaireResults.
- ibo CLI: a server that exits at startup is reported without a
  traceback, with "exited with code N" instead of a misleading timeout.
- PythonStarter: the no-interpreter message no longer claims nothing
  was found when interpreters were skipped; stale installer comments.
- sync_backends removes folders a removal empties, with their .meta, and
  --check reports .meta files without an asset; build_packages refuses
  to write an empty archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tagline, protocol badge and the overview figure ("Any front end", with
  an outlined slot for your own tool) present iBO as engine-independent;
  the new section "One optimizer, any front end" lists the front ends and
  shows a complete study as recorded on the wire. It replaces "At a
  glance" and "Use iBO in your own project", which overlapped with it.
- Corrected: the Python quick start (a relative --python path failed
  because the server runs in Backend/; the client now makes such paths
  absolute, and the quick start installs the client into the venv), the
  Unity version wording, the web relay that does not exist, which methods
  run on BoTorch or botorch-rust, MetaTAF's extra package, how to select
  contextual optimization, the status bullets (own section), the
  real-stack test variables, the CI test commands, the citation year.
- Captions under the animations now add what the figure does not show;
  the first animation's estimate is built exactly like bo.py's model.
- protocol/README.md: the sequence diagram shows when tempCoverage and
  coverage arrive; architecture.md and CITATION.cff describe any front end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: iBO logo at the top and the authors with their affiliations; an
  animation of the roles in a study (designer, participant, interactive
  system, iBO) before the architecture overview; one subsection with an
  explanation before each behavior animation (one parameter, two
  conflicting goals, a drifting optimum); the publications as a table;
  a pointer to the BOforUnity branch for version 1.9.1.
- Version 2.0.0 in all version files; the numbering continues that of
  Bayesian Optimization for Unity 1.x, as the README and the migration
  guide explain.
- Dependencies: torch 2.15.0 and pandas 3.1.0, tested with the backend's
  real-optimizer tests, the Python client's studies and the Unreal
  launcher; CI uses actions/setup-python v7 and also tests Python 3.15.
- tools/readme_figures draws the logo and the roles animation from a
  recorded run of the `ibo demo` study.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T09:02:43.630033Z a160143 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1601439cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

for item in list(self.parameters) + list(self.objectives):
if not (math.isfinite(item.low) and math.isfinite(item.high)):
raise ValueError(f"'{item.key}' needs finite bounds, got ({item.low}, {item.high}).")
if item.high < item.low:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject degenerate parameter bounds during client validation

When a Parameter has low == high, this check passes and IboClient.start() sends the study, but the backend rejects degenerate parameter ranges in bo_protocol.validate_parameter_bounds, so no design is produced. Reject equal bounds for parameters here; objective bounds may still be equal.

Useful? React with 👍 / 👎.

@Pascal-Jansen
Pascal-Jansen merged commit 5797589 into main Oct 29, 2026
8 checks passed
@Pascal-Jansen
Pascal-Jansen deleted the ibo-restructure branch October 29, 2026 09:09
Pascal-Jansen added a commit that referenced this pull request Oct 29, 2026
On pushes, the whitespace check ran git diff-tree without rename detection. It therefore reported 441 trailing spaces that the moved QuestionnaireToolkit files already had before #27. With -M, a moved file counts as a rename, so only changed lines are checked, as in pull requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant