A campaign is the central unit of work in MatCraft. It ties together a material definition, seed data, a surrogate model, and an optimization strategy. Here is how to launch your first campaign in three steps.
Create a YAML file describing your material's design space:
# my_material.yaml
name: "polymer-membrane-v1"
domain: water_membrane
components:
- name: polymer_concentration
type: continuous
bounds: [0.05, 0.40]
unit: "wt%"
- name: additive_loading
type: continuous
bounds: [0.0, 0.15]
unit: "wt%"
- name: crosslinker_ratio
type: continuous
bounds: [0.01, 0.10]
objectives:
- name: water_flux
direction: maximize
unit: "L/m2/h"
- name: salt_rejection
direction: maximize
unit: "%"Provide initial measurements in CSV format:
materia data import --material my_material.yaml --file initial_data.csvYour CSV should have columns matching each component name and objective name. A minimum of 10 data points is recommended; 20-30 points will produce a more reliable initial surrogate.
materia campaign run \
--config my_material.yaml \
--max-iterations 15 \
--batch-size 5 \
--output results/Or via the Python SDK:
from materia import Campaign, Material
material = Material.from_yaml("my_material.yaml")
campaign = Campaign(
material=material,
max_iterations=15,
batch_size=5,
)
campaign.run()
campaign.export("results/")The campaign will train an initial surrogate, then iteratively propose candidates, evaluate them, and retrain. Progress is displayed in real-time on the dashboard or in terminal output. Typical campaigns with 3-5 parameters converge in 8-15 iterations.