Learning strategies for flexural strength (FS) forecasting needs to be developed and evaluated since there is a dearth of research on FS of basalt fiber reinforced concrete (BFRC). The current research examined a technique called random forests (RF) for target estimation. This simulation is very dependent on its hyperparameters; to find the best set of hyperparameters, RF is paired with the Dwarf mongoose algorithm (DMA) and the Chaos game algorithms (CGA). The data collection includes 245 data points gathered from the literature. The input traits included ten distinct elements: cement, fly ash, silica fume, coarse aggregate, fine aggregate, water, water reducer, fiber diameter, fiber length, and fiber content. This study aimed to evaluate the prediction capability of numerous ML algorithms for the FS of BFRC and to enhance the comprehension of their fundamental concepts. Regarding R2 values, RF-C outperformed RF-D with values of 0.988 and 0.9932, respectively. Particular measurements demonstrate this. With lower values of metrics at around 20% in the training part and approximately 45% in the testing part, the disparities in the outcomes of the two patterns demonstrate the superiority of RF-C. This demonstrates the dependability and power of RF-C in comparison to RF-D, even though RF-D has excellent precision. Engineers may optimize material consumption and cost by designing BFRC\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$BFRC$$\end{document} blends that fulfill structural requirements using accurate FS\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$FS$$\end{document} prediction. Safety, sustainability, and waste reduction are achieved by reliable models that minimize overdesign and structural collapse under flexural stresses.