ER-TRPO–ANFIS: MATLAB Implementation for Ultra-High-Performance Concrete Property Estimation
Abstract
# Dual-agent ER-TRPO-ANFIS for UHPC — MATLAB R2025b Source files: `main.m` (entry point), `ertrpo_agents.m`, `uhpc_anfis.m`, `uhpc_data.m`. ## MATLAB toolboxes - MATLAB R2025b (Windows 11 x64 as in the manuscript)- Reinforcement Learning Toolbox- Deep Learning Toolbox- Fuzzy Logic Toolbox- Statistics and Machine Learning Toolbox (for `cvpartition`, `bayesopt`)- Parallel Computing Toolbox (optional parallel Bayesian evaluations)- A supported CUDA-enabled NVIDIA GPU (optional) The ER-TRPO trust-region algorithm is implemented explicitly using Deep Learning Toolbox automatic differentiation and Fisher/KL Hessian-vector products. Reinforcement Learning Toolbox is a stated environment dependency, but the MATLAB built-in TRPO agent is **not** used, because it would not implement the manuscript's custom entropy-regularized objective. ## Run Set the MATLAB current directory to this folder and execute: ```matlabmain('MBData','C:\\data\\MB-UHPC.xlsx', ... 'MBTarget','28-day compressive strength', ... 'MBExclude',{'28-day flexural strength','mini-slump spread','28-day porosity'}, ... 'KData','C:\\data\\K-UHPC.xlsx', ... 'KTarget','Compressive strength', ... 'BOEvaluations',12,'OuterFolds',5,'InnerFolds',5, ... 'UseParallel',true,'UseGPU',true,'OutputDir','results');``` Replace column names with **exact** names in your datasets. Source dataset files must be provided by the user; no synthetic samples or reported outcomes are substituted. For an inexpensive wiring test, set `QuickCheck` to `true`, reduce `BOEvaluations`, and disable parallel execution if needed. That check does not reproduce published results. ## Study correspondence and limitations - The first policy samples feature-inclusion decisions; the second operates three categorical action heads, updating the membership-function count, family, and ANFIS learning-rate step sequentially.- The agents interact through ANFIS validation RMSE; the first reward includes a feature-count penalty.- ER-TRPO uses an importance-weighted advantage surrogate, entropy bonus, KL Hessian-vector product, conjugate gradient, and backtracking line search with an explicit KL limit.- ANFIS is a first-order Sugeno model trained with the Fuzzy Logic Toolbox hybrid optimizer. To avoid combinatorial grid-rule explosion with 24 features, rules are *cluster-aligned*: `m` rules with `m` input membership functions, rather than the full `m^d` Cartesian product. This design affects exact reproducibility.- Each outer fold has an independent inner five-fold Bayesian search. Model selection uses training-only validation; the outer test fold is untouched until final evaluation. The five reported metrics are computed from predictions.- No numerical results from the manuscript are hardcoded. Bayesian search range and policy architecture are exposed as code configuration. Stochastic rollout updates are on-policy, never replay-buffer training.- Dropout layers are present in the MLP architecture; the custom KL optimization evaluates policies in deterministic inference mode to stabilize trust-region comparisons.- Inner/outer runs are computationally intensive. Runtime grows sharply with the 5x5 nested CV and the large Bayesian search.- This repository targets MATLAB R2025b but was **not executed in a MATLAB R2025b installation** in this environment. MATLAB API/runtime validation remains necessary. GPU and CUDA/cuDNN compatibility must be checked for the installed MathWorks support package and driver. The GPU in the manuscript is described as an RTX 4090 with 32 GB, although commercially standard RTX 4090 boards normally have 24 GB; verify the actual workstation specifications before publication.