Toward autonomous additive manufacturing: Bayesian optimization on a 3D printer

Materials exploration and development for three-dimensional (3D) printing technologies is slow and labor-intensive. Each 3D printing material developed requires unique print parameters be learned for successful part fabrication, and sub-optimal settings often result in defects or fabrication failure. To address this, we developed the Additive Manufacturing Autonomous Research System (AM ARES). As a preliminary test, we tasked AM ARES with autonomously modulating four print parameters to direct-write single-layer print features that matched target specifications. AM ARES employed automated image analysis as closed-loop feedback to an online Bayesian optimizer and learned to print target features in fewer than 100 experiments. In due course, this first-of-its-kind research robot will be tasked with autonomous multi-dimensional optimization of print parameters to accelerate materials discovery and development in the field of AM. The combining of open-source ARES OS software with low-cost hardware makes autonomous AM highly accessible, promoting mainstream adoption and rapid technological advancement. The discovery and development of new materials and processes for three-dimensional (3D) printing is hindered by slow and labor-intensive trial-and-error optimization processes. Coupled with a pervasive lack of feedback mechanisms in 3D printers, this has inhibited the advancement and adoption of additive manufacturing (AM) technologies as a mainstream manufacturing approach. To accelerate new materials development and streamline the print optimization process for AM, we have developed a low-cost and accessible research robot that employs online machine learning planners, together with our ARES OS software, which we will release to the community as open-source, to rapidly and effectively optimize the complex, high-dimensional parameter sets associated with 3D printing. In preliminary trials, the first-of-its-kind research robot, the Additive Manufacturing Autonomous Research System (AM ARES), learned to print single-layer material extrusion specimens that closely matched targeted feature specifications in under 100 iterations. Delegating repetitive and high-dimensional cognitive labor to research robots such as AM ARES frees researchers to focus on more creative, insightful, and fundamental scientific work and reduces the cost and time required to develop new AM materials and processes. The teaming of human and robot researchers begets a synergy that will exponentially propel technological progress in AM.


Introduction
Additive manufacturing (AM) (i.e, threedimensional (3D) printing) has transformed manufacturing, making custom production of parts and prototypes accessible to the broad community, from everyday hobbyists to aerospace engineers. Unfortunately, printing processes are tightly linked to feedstock materials. Each time a feedstock formulation is changed, the exact printing conditions must be re-learned through timeconsuming and labor-intensive trial-anderror work. Moreover, because of the large number of adjustable parameters for AM, [1][2][3] deep optimization by traditional brute-force methods is nearly impossible. To accelerate the process of learning optimal printing conditions, we look to autonomous systems, referred to as research robots. 4 We developed the Autonomous Research System (ARES), the first fully autonomous research robot for materials development, which designs, executes, and analyzes its own experiments using iterative, closedloop artificial intelligence (AI) planners. 5 The AI approach that the research robot uses can range from high-level reasoning to more statistical approaches, such as machine learning (ML). The unique factor distinguishing autonomous research robots lies in their Impact Article ability to iteratively learn from prior experiments and their ability to autonomously design and implement new experiments.
Many groups have begun to implement ML techniques in an open-loop capacity to facilitate an increase in quality and throughput, and to bolster overall adoption of AM technologies in the manufacturing industry. For example, there are several groups working on establishing laser powder bed fusion defect detection systems using ML, [6][7][8] wherein different types of defects can be detected and classified in situ. In these cases, ML algorithms are used in real or near real time to predict final product characteristics based on correlated ex situ training data sets; however, there is no autonomous closed-loop iterative improvement. In another important example of ML in AM, researchers are implementing ML-based algorithms in a predictive manner to accelerate composite materials selection and design processes for AM. 9 ML is even being applied to assist AM production lines in quickly estimating the pecuniary costs associated with part fabrication. 10 While these types of ML efforts are a crucial component for the advancement of AM, we distinguish them from autonomous closed-loop systems, such as research robots, wherein ML planners use integrated sensor feedback to autonomously (and efficiently) learn the optimal process parameters required for producing a part that meets target specifications.
The viability of research robots has emerged in recent years. 4,11 Recently, we developed the carbon nanotube (CNT) ARES, a research robot that we tasked with learning to grow carbon nanotubes at controlled rates using our custom ARES OS software and ML algorithms. 5 In perhaps the earliest implementation, King et al. developed a research robot to autonomously identify the function of genes in the yeast Saccharomyces cerevisiae. 12,13 Other, more recent examples include the employment of research robots in continuous flow chemistry to optimize reaction conditions 14,15 and the production of Bose-Einstein condensates. 16 Despite their applicability, there is a marked scarcity of research robots being employed directly in the field of AM. Research robots seem ideally suited for optimizing the sundry parameters critical for realizing targeted part specifications, yet their application toward 3D printing remains largely underexploited. To the best of our knowledge, at the time of this work, there were only a few examples of AM research robots in literature. In one example, Wang et al. demonstrated a research robot that uses in-line atomic force microscopy to provide microscale topographical feedback to an ML planner to autonomously fabricate complex micro-patterns using e-jet printing. 17 By applying a Spatial Iterative Learning Control algorithm to a 2D framework, the system is able to compare a digitized height-map of a printed sample to a desired structure and correctively modulate the material ejection stimulus. More recently, Gongora et al. developed an autonomous system for mechanically testing parametric 3D-printed 'crossed-barrel' structures. 18 In their innovative work, they integrated a sixaxis robotic arm with five fused deposition modeling (FDM) 3D printers, a digital scale, and a universal testing machine (UTM). As 3D-printed specimens are fabricated, the robotic arm is used to measure their mass and mount them in the UTM for compression testing. The testing results are then fed back to the ML software, where they are used to produce updated models to establish crossed-barrel parameters (number of struts, strut angle) for subsequent prints. Theirs is a body of work that demonstrates the efficacy of ML in AM; in only 64 experiments, their ML system outperformed a 1800-experiment grid search. While these groundbreaking examples may involve very specialized and expensive equipment, they exemplify the application of ML in overcoming the challenges associated with tuning highly complex AM systems that are exceedingly sensitive to materials variations and uncontrolled environmental conditions. Despite recent advances, AM technologies are still hindered by the painstaking and time-consuming trial-and-error processes required to establish the specific parameters needed to reliably and effectively utilize each material on a given AM platform. Generally, optimization remains a manual and intuitive process, as there is a pervasive absence of actionable feedback mechanisms to provide (near) real-time information about the state of the fabricated product to the machine performing the work; it goes about performing its prescribed tasks without knowledge of whether it is generating the desired product. To make matters worse, additive processes are inherently complex and typically involve an unwieldy number of sometimes-conflicting parameters. [1][2][3] We applied an ML approach to material extrusion-type printers first, based not only on their accessibility and popularity in the maker community in the form of FDM printers, but also based on the ease with which they can be converted to closed-loop systems. For typical FDM systems (FDM is a subset of material extrusion), Sheoran et al. have outlined 13 primary parameters used to direct a 3D print. 19 However, as slicing software (software that converts a 3D model to specific print instructions) continues to evolve, myriad secondary parameters have emerged that allow even greater control over part quality. For instance, the widely used, open-source 3D printing software package Ultimaker Cura provides users with more than 300 adjustable parameters for optimizing a print. 20 Optimization of these many parameters using traditional noniterative systematic methods (i.e., Design of Experiments) is impractical, as the number of required print experiments would be enormous. As an example, if we consider a full factorial experiment design using only the 13 basic parameters with five levels (parameter increments) each, more than one billion (5 13 ) experiments would need to be conducted to obtain results for all possible combinations. Moreover, once optimal parameters are realized for producing a specific part, the large number of uncontrolled parameters (e.g., ambient temperature and humidity, batch-to-batch material variance, and system attrition) could lead to the formation of defects, poor quality, and reduced yield, requiring parameter optimization to be repeated.
To address these shortcomings in the AM technology field, we introduced our prototype research robot, AM ARES, which Toward autonomous additive manufacturing: Bayesian optimization on a 3D printer uses in-line automated image capture and analysis as direct feedback to a closed-loop ML planner to accelerate the optimization of extrusion-based printing on a customized commercial 3D printer ( Figure 1, Figure 5). We are not aware of any AM system that employs this relatively low-cost and easily integrated feedback mechanism. Moreover, we have designed the AM ARES system with accessibility in mind in order to promote widespread collaboration and unhindered exploration: First, AM ARES is accessible online via the web. This permits an AM ARES system to remotely access numerous existing web-based ML planners in order to facilitate collaboration and expedite scientific discovery. This also lowers the barrier for computer scientists and autonomy researchers who need a platform to test their algorithms in real-world experimental settings. It is important to recognize the advantage of materials science as a problem space for testing AI algorithms because of their ground truth in materials science, physics, and chemistry. Second, we are making the ARES OS software and AM ARES-specific software and hardware designs available as open-source. 21 We believe that the increased access afforded via remote access and open-source assets will unleash the power of crowd-sourcing toward rapid technological advancement. To the best of our knowledge, AM ARES is currently the only autonomous AM system to adopt these approaches (Figure 1).
In this preliminary work, we chose to demonstrate the efficacy of AM ARES by tasking it with optimizing the geometry of the leading segment of printed lines (Figure 2) using syringe extrusion-based printing and a remote ML planner made available via an online cloud server. The goals of this work were twofold: First, we needed to validate our prototype AM ARES system as a functioning research robot that is able to effectively employ ML techniques to optimize material extrusion processes. Second, since materials extrusionbased 3D printing creates parts by building up hundreds or even thousands of individual layers, it is imperative that each layer be deposited with precision. Given that each layer is constructed serially by depositing discrete lines until the required pattern is achieved, the precise placement and geometry of the printed lines are critical. Indeed, cumulative errors in the deposition of each layer in a 3D print can result in undesirable print defects (e.g., gaps, oozing, rough corners) in the finished part or could result in complete part fabrication failure. Hence, from a hierarchical perspective, it made sense for us to begin the autonomous optimization process by focusing on some of the most elementary single-layer features that comprise a complete 3D-printed object. This bottom-up approach is even more crucial when performing optimization on novel and experimental materials that may have never before been used for AM processes.

Results
As stated previously, many parameters can be tuned to optimize a specific print. Here, we focused solely on four fundamental syringe extrusion parameters that influence easily distinguished geometric aspects of the leading segment of a printed line. These parameters are 'prime delay,' 'print speed,' 'x-position,' and 'y-position' and are explained in detail later in the text.
In keeping with a systematic and hierarchical approach, we began by delegating AM ARES with control of a single parameter, the 'prime delay,' and tasked it with determining the best value for printing a line whose leading segment most closely matched our target geometry ( Figure 2b).
An appropriate prime delay value is key to ensuring that deposition commences at precisely the correct time (and, as a result, location). If set too low, motion will begin before enough material has extruded onto the substrate and the initial deposition will be insufficient ( Figure 2c). If set too high, too much material will be deposited prior to the commencement of motion resulting in a large bulbous leading segment ( Figure 2d). In each experiment, AM ARES printed a 12 mm line and captured an image of the leading segment. An image analysis module returned a single 'objective score' based on the two-dimensional size, shape, and location of the printed feature. Here, the target shape for the leading segment of printed lines was defined as a combined rectangle and semi-circle,  Figure 1. A simplified flowchart is provided as an overview to the prototype Additive Manufacturing Autonomous Research System (AM ARES) closed-loop autonomous printing process. The process begins when the user selects the material, the parameters, the fixed parameter values, and the parametric toolpath for the syringe extrusion deposition process. For each cycle, the current parameter values are used by the toolpath to create a set of specific printing instructions, and the specimen is deposited ('PRINT'). Next, AM ARES' machine vision system captures an image of the specimen's user-defined region of interest ('IMAGE'). The captured image is sent to the user-selected image analyzer ('ANALYZE'), which evaluates the specimen and returns a corresponding score. Finally, the planned parameter values and associated specimen score are sent to the user-selected planner ('PLAN'), where the values are appended to the previous dataset, a new model is generated, and new planned parameter values are again passed to the toolpath. FDM: fused deposition modeling as shown in Figure 2b. To elucidate the effectiveness of the optimization process, we intentionally set the conditions so as to be relatively challenging: We selected a 0.42 mm dispensing tip, and the target shape for the leading segment was almost three times wider at w = 1.2 mm.
We formulated an objective-scoring algorithm that returned the quotient of the effective specimen area divided by the desired region's area (Equation 1). In this work, the desired region, A desired , is indicated in Figure 2b by the diagonal fill lines. The effective area is defined as the area of the specimen internal to the desired region (A inside ) less the area of the specimen external to the desired region (A outside , Figure 2e). Negative values for effective area are set to zero. An ideal print, wherein the outline is completely filled without any specimen external to the outline, would achieve a maximal objective score of 1.0 (Equation 2).
The results of the one-parameter campaign are shown in Figure 3a, where initial objective scores are near 0.6. After trying values along the single parameter, AM ARES quickly identifies a promising region, and stays in a narrow range through the remainder of the campaign, reaching a maximum objective score of ~ 0.77 in iteration No. 81. Ultimately, AM ARES achieves convergence at a prime delay value of ~ 0.18 s.
Given the results of the initial single-parameter campaign, the next logical step was to run a subsequent campaign wherein we delegated AM ARES with control of an additional parameter. For this case, AM ARES optimized both 'prime delay' and 'print speed,' and the results are shown in Figure 3c. The planner searches the space of both parameters over the first ~ 50 trials, finding an optimal combination and remaining with these low values (prime delay and print speed values of ~ 0.36 s and ~ 1.34 mm/s, respectively) for the remainder of the campaign. Here, a maximum objective score of ~ 0.91 was achieved in iteration No. 97.
For the one and two-parameter campaigns, we calibrated the offset vectors between the dispensing tip and analysis camera with reasonable accuracy, as illustrated by the alignment of the specimens in the target outline in Figure 3b and d. To introduce greater complexity, we chose to run a third campaign where the x-and y-components of the offset vector were deliberately set to misalign the leading segment with the desired region's outline (Figure S1), and we assigned AM ARES control over two additional parameters, 'x-offset correction' and 'y-offset correction.' The results of this four-parameter campaign are shown in Figure 3e.
Here  Toward autonomous additive manufacturing: Bayesian optimization on a 3D printer Discussion AM ARES succeeded in learning to accurately print the desired feature. It converged in its iterative search over one, two, and four adjustable printing parameters, achieving nearideal production of the user-defined structure in less than 100 iterations. Here, we delve into the details of the autonomous research process, planning, and implications. A simplified flowchart is provided in Figure 1 as an overview to AM ARES' prototype closed-loop autonomous printing process. Autonomous experimentation begins with the user pre-configuring the campaign of print experiments. Here, the user defines, among other things, the controlled or 'planned' parameters (e.g., print speed), fixed parameter values (e.g., working distance = 0.3 mm), parameter limits, seed conditions, toolpath (a user-generated set of parametric printing instructions), termination condition(s) (e.g., the minimum number of experimental iterations), target or threshold objective value, planner to be employed (e.g., gradient descent, BO), image analyzer, and relative imaging coordinates. The toolpath, image analyzer, and planner are all modular in that new embodiments can be added to the system as needed to suit the experiments being carried out. Depending on the choice of planner, the user may be required to enter a specific number of seed values for each of the controlled parameters, and these will be used in place of the planner for the initial experiments to establish a preliminary model.
To effectively manage the printing space available for a print campaign, AM ARES uses the geometric toolpath extents to divide the substrate into a grid of cells and manages print campaigns such that any unused cell can be allocated for a print experiment. In this way, hundreds of experiments can be run on a given substrate on our prototype system without human intervention. After each specimen is printed, AM ARES performs a simple automated dispensing tipcleaning step ( Figure S2). This is important to prevent material from drying and accumulating at the end of the dispensing tip, which would likely have cumulative detrimental effects on subsequent experiments. Additionally, the system may dwell for a preset time to allow rheological recovery for thixotropic materials. The next step in the process is to capture one or more images of the most recent print result. AM ARES performs image capture, as prescribed, and feeds the image(s) to the user-selected image analysis routine(s), where appropriate metrics are measured and compared against a target geometry. The resulting metric ('objective score' in this case) and corresponding values for the controlled process parameters ('prime delay') are then appended to the data from all previous experiments in the campaign. This complete and up-to-date dataset is sent in JavaScript Object Notation (JSON) format to the planner. Also included in the JSON file are the upper c d e f and lower limits for all applicable parameters, as defined by the user. The planner receives these data, updates its model, and chooses the controlled process parameter values for the next iteration based on the ML planner's policies. The entire process repeats until user-defined termination conditions have been satisfied. We implemented the AM ARES system in a manner that allows for modular employment of any suitable ML planner. For the work presented here, the system was resourced with a BO, which resided on a cloud-based server in order to evaluate and substantiate AM ARES' ease of access. BO is an all-purpose global optimization algorithm that is wellsuited for problems in which little is known about the characteristics of the objective function to be optimized and data are limited (e.g., slow or expensive to collect, small existing database). BO's systematic search process ensures that optimization is achieved efficiently and reliably. The algorithm has been applied in a wide array of disciplines, including materials sciences, where some of its applications include material synthesis 22,23 and materials discovery. [24][25][26][27] BO comprises two complementary components that work in unison: (1) a surrogate model (i.e., a 'best guess' function fit to the observed data), and (2) an acquisition function that decides which parameter values to interrogate next in order to improve the surrogate model. BO typically employs a Gaussian Process (GP) to generate a function fit to the current dataset. This fitting function, f(x), can employ any number of parameters and is generated using a multi-dimensional Gaussian probability distribution to determine the mean (μ) and standard deviation (σ) for all x. 28 The σ values, in turn, are used to calculate the confidence of each mean value for all x (Equation 3). In this work, since we are performing a maximization of the objective score, the acquisition function chooses the point where the sum of the mean and confidence is highest as the subsequent sampling point (Figure 4, red dashed line). The mean values and confidence values are represented in Figure 4 as the blue line and light blue area, respectively.
To determine the best sampling values, the acquisition function inherently employs a balanced exploitation versus exploration approach, wherein it chooses to either sample from a region known to produce good results (exploitation) or explore a relatively under-sampled region (exploration). The abrupt yet brief drops in the objective score with corresponding changes in parameter values (e.g., experiments 24, 48, and 85 in Figure 3a) demonstrate the characteristics of the acquisition function. The BO planner is never content with its current optimal value, and will from time to time seek out a superior one in a relatively under-sampled region (exploration). If the results of the under-sampled region are poor, the local upper confidence bound will decrease such that the algorithm returns to sampling in a region known to yield better results (exploitation). This is visible in all three graphs.
BO is an adaptive search process in that the GP model is updated as new observations are made. Each time the dataset is updated with new observations, the model fitting process is repeated. The acquisition function is then used to provide parameters for the next experiment, and its result is added to the database, at which point the search process repeats. An illustration of this fitting-proposing cycle is shown in Figure 4. For a more in-depth and technical tutorial of BO and GPs, we direct readers to Reference 29.
The effects of background noise are also manifested in the data. Here, significant shifts in objective score without corresponding changes in parameter values are observed (e.g., experiments 60-61 in Figure 3a). These shifts are artifacts of material inhomogeneity, environment fluctuations, and substrate defects (Figure S3). To effectively extract global optima from these types of real-world experimental data, noise-tolerant algorithms such as BO are essential. 30 This being said, the optimization process can be improved by reducing system noise, and we will be exploring this in future work. The background noise of these experiments was empirically quantified by printing and evaluating 100 trials using fixed, near-optimal parameter values. The objective score mean, standard deviation, and relative standard deviation were found to be 0.90, 0.027, and 3.0%, respectively ( Figure S4).
Despite its popularity, there are limitations and challenges associated with applying BO in practice. The algorithm comes with a set of 'hyperparameters' that require tuning and can heavily influence performance. While tuning all hyperparameters can be fully automated (high computational cost), it is often more efficient and practically feasible to tune only a subset of them manually. 31 Additionally, BO becomes significantly more challenging in high dimensions as more data are required for accurate estimation. Concretely, the performance of BO may suffer when the dimensionality of the data exceeds 10 to 20 dimensions. 32 Selection of appropriate ML techniques depends on the application, and future work may require that alternative techniques be adopted.
Successful syringe extrusion-based printing requires careful tuning of numerous intricate print parameters, many of which may not be obvious to the general community. Immediately prior to deposition, the syringe extruder requires priming, wherein the syringe plunger is depressed by a prescribed distance, at a prescribed rate, and with a prescribed delay between the time when the priming occurs and when motion commences. The optimal prime settings will be related to the geometry of the dispensing tip, the rheology of the material being extruded (e.g., yield stress and viscosity), and the desired shape of the printed feature. If these parameters are not adequately tuned, the leading segment can suffer over-extrusion (Figure 2d) or under-extrusion (Figure 2c) relative to the target geometry (Figure 2b). Once motion begins, many other parameters, including the extrusion rate, the print speed, and the precise transverse location where printing takes place, are crucial in achieving the desired line width and alignment. Confidence = Acquisition parameter · σ Toward autonomous additive manufacturing: Bayesian optimization on a 3D printer For the one-parameter, 'prime delay' case, AM ARES achieves an objective score of 0.77 after 81 iterations. It is important to note that this result is unique to the singleparameter case; this prime delay value may not be optimal for campaigns where AM ARES can vary additional controlled parameter values. In this scenario, the optimization process is limited to what can be accomplished through modulation of the 'prime delay' value only, and the system arrives at the optimal balance of 'over-filling' and 'under-filling' of the idealized outline, wherein the net penalties are minimized (Figure 3b). Modulation of prime delay alone is insufficient to achieve an objective score near 1.0 given the conditions of this experiment. Control of additional parameters (e.g., print speed) is required to rectify the observed under-filling of the desired outline. When provided with control over two parameters, the 'prime delay' and 'print speed,' AM ARES yields an improved objective score of ~ 0.91. Evidently, this is achieved through a reduction in print speed from the fixed value of 5.0 mm/s in the one-parameter case to 1.34 mm/s in the two-parameter case. We surmise that at higher print speeds, the print material's flow rate is viscosity-limited, resulting in an inadequate volume of material dispensing from the tip in the time it takes for the printer to complete the respective motion. A reduced print speed then is required to provide sufficient time for the material to deposit at the desired quantity. Hence, at 1.34 mm/s, a larger volume of material is dispensed, and a larger proportion of the target outline is filled.
Finally, when given control of two additional parameters, 'x-offset correction' and 'y-offset correction' (a total of four parameters), AM ARES achieves an impressive optimized objective score of ~ 0.94. Interestingly, the optimized 'prime delay' value in this case is zero. This suggests that when provided with control over the 'print speed' and the x-and y-location of the leading segment, there is no longer a need for the planner to establish a non-zero value for 'prime delay' for this specific scenario; AM ARES has learned to shift the print location in order to accurately fill the target outline. Individually plotted data for this campaign are shown in Figure S5 to elucidate the progression of each parameter. Additional four-parameter campaigns are shown in Figure S6, where variations on the nozzle size and 'prime distance' are explored.

Conclusion
In this preliminary work, we have demonstrated the successful optimization of an elementary single-layer print feature via online cloud-based planning of up to four parameters with virtually continual parameter levels in under 100 iterations (<3 h). In contrast, a similar factorial design of experiments to optimize four parameters at only 10 levels each would have required 10 4 = 10,000 iterations-a difference of two orders of magnitude. Arguably, the intuition of a human expert in the field may have performed comparatively well for the simplified scenario presented herein as a proof-of-concept; however, this work showcases the fundamental applicability and utility of ARES for material extrusion processes and is a stepping-off point for a host of future autonomous research applications in the field of AM.
AM ARES is aptly poised for rapid advancement to address much more complex and high-dimensional printing challenges. In the near term, AM ARES will undergo software upgrades to enable targeting of multiple objectives 33-35 and image capture at multiple locations using either or both of the installed cameras. A second-generation custom syringe extruder will be installed that is capable of higher resolution dispensing and incorporates a load cell for real-time pressure feedback of the syringe. These enhancements will accelerate optimization by vastly reducing the system noise and system drift that results from inconsistent and residual pressure in the syringe. New analysis routines will continue to be developed to suit the requirements of increasingly complex additively manufactured specimens; it is our goal to advance these analyses beyond 2D.
In time, analytical models will utilize our ever-expanding database as learning sets for more predictive and adaptive hypotheses based on a broader parameter space. New feedback mechanisms, such as live streaming video, can be incorporated into this or future incarnations of the AM ARES system, improving its performance and increasing its responsiveness toward real-time feedback. The prototype AM ARES system has been (and continues to be) designed to promote widespread accessibility and adoptability throughout the AM community and academia. To that end, we will soon begin incorporating AM ARES into inexpensive (<US$250) FDM printers with integrated vision feedback systems. Ultimately, we hope to see adoption of AM ARES across all AM platforms toward accelerated technological advancement. To our knowledge, AM ARES is the first implementation of a research robot performing fully closed-loop and remote autonomous material extrusion printing, wherein print parameters are optimized using relatively low-cost image analysis techniques and online cloud-based ML algorithms. AM ARES efficiently performs traditionally tedious and repetitive tasks, replacing human manual labor, while also using ML techniques to perform high-dimensional search over printing conditions that supports human cognitive work. Ultimately, the teaming of human and robot researchers is expected to greatly multiply the speed of AM technological progress. 24 While ARES is certainly not limited to materials extrusion processes, we believe that the widely available materials extrusion class of 3D printers (e.g., MakerBots) makes it highly accessible to a broad community. In addition, the modular online planner opens AM ARES up to the entire range of ML planners which need not be resident on the AM ARES system. Finally, we are making our ARES OS autonomous research software and AM ARES hardware designs open-source to increase access to autonomous research systems to materials scientists, AI researchers, and citizen scientists. This strategy will encourage rapid advancement in the field of AM in both the scientific and maker communities.

Materials and methods
The prototype AM ARES extrusion-type printer is shown in Figure 5a (also see Figure S7). We designed AM ARES to be relatively simple and low-cost to facilitate reproduction and to better emulate commercial-grade systems. To that end, we procured and repurposed a Lulzbot TAZ6 FDM system (Aleph Objects, Inc., Loveland, CO, USA) for its motion system and basic motion calibration functions (e.g., mesh bed leveling). We replaced the stock FDM print head with a lowcost, custom-designed syringe extruder to enable exploration of diverse sets of materials, with the ultimate goal of autonomous print optimization of new and novel materials. We fabricated the custom syringe extruder (Figure 5b) using a combination of 3D-printed and commercial off-the-shelf components. The custom extruder accepts disposable 10 mL polypropylene syringes (Norm-Ject Manuf. #4100.X00V0), and for this work, we employed 0.42 mm (0.017 in.) dispensing tips (McMaster-Carr, Cat. #75165A684). As shown in Figure 5b, a carriage mounted to a motor-driven lead screw advances or retracts the syringe plunger, as directed by the software. We also incorporated an integrated vision system into the custom print head using two machine vision cameras (IDS Imaging Development Systems Inc., Stoneham, MA, USA, Figure 5c), one mounted at an angle to observe the deposition process in real time (the 'process' camera), and one mounted normal to the substrate at a fixed offset with respect to the deposition tip for inline analysis (the 'analysis' camera). For these initial experiments, we opted to deposit Alex Plus Acrylic Latex Caulk Plus Silicone. This commercially available material was chosen based upon its suitable rheology, affordability, homogeneity, and low toxicity. Furthermore, we chose a b c Figure 5. (a) The prototype AM ARES test platform. A commercially available and opensource 3D printer (LulzBot, TAZ 6) was purchased and converted from a fused deposition modeling motif to syringe-based materials extrusion to enable materials exploration. To do this, we removed the original print head and replaced it with a custom syringe extruder using off-the-shelf and 3D-printed components (b). The extruder depresses or retracts a syringe plunger via a carriage (B) that is raised or lowered by a stepper motor-driven lead screw (A). (c) In order to enable closed-loop autonomous printing, we integrated two cameras into the syringe extruder to provide real-time process views (C) and in-line analysis normal to the substrate (D).
Toward autonomous additive manufacturing: Bayesian optimization on a 3D printer white caulk because it provided high contrast against a black substrate, which facilitated image processing (Figure 2).
When setting up a print campaign, the user was required to provide AM ARES with a 'toolpath.' Toolpaths are text files that contain the coordinated motion instructions needed for printing a desired specimen. For our prototype system, these instructions can control motion in four axes: X, Y, Z, and E ('Extruder'). To establish a quasi-equilibrium rheology, we provided the system with a toolpath that directed the printer to deposit a serpentine 'lead-in' line immediately prior to depositing a single 12 mm 'specimen' line for analysis (Figure 2a). The user pre-selected all print parameters that were not explicitly controlled by AM ARES, and the system held these fixed for the duration of the autonomous print campaign. Each iteration required 1-2 min to print the specimen, clean the dispensing tip, capture an image, perform image analysis, record the data, and remotely plan the parameters for the subsequent iteration, resulting in a throughput of 30-60 complete iterations per hour.
After depositing each specimen, the system carried out a 25 s dwell to provide opportunity for rheological recovery of the ink prior to performing the dispensing tip-cleaning routine ( Figure S1). After cleaning the dispensing tip, the system captured an image of the leading segment of the deposited line and processed it using the pre-selected image analyzer module. The analysis procedure and scoring algorithm are described in the Results section. As mentioned previously, we employed a BO algorithm to plan experiments, which supplied new input conditions for the AM ARES printer toward the campaign objective. After the completion of each iteration, AM ARES sent the aggregate objective scores, parameter values, and parameter limits (i.e., the most up-to-date campaign database) in JSON format to the BO planner. After creating the updated model, the planner generated a new set of parameters that were returned to AM ARES and used for the subsequent iteration. We opted to provide three user-seeded experiments to establish an initial model at the outset of each campaign. The seed values were 0.0 s, 2.5 s, and 5.0 s for 'prime delay;' 1.0 mm/s, 3.0 mm/s, and 5.0 mm/s for 'print speed;' and 0.0 mm, 0.1 mm, and − 0.1 mm for both 'x-offset correction' and 'y-offset correction.'

Open Access
This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.