Asanimportantnon-ferrousmetalstructuralmaterialmostusedinindustryandproduction,aluminum(Al)alloyshowsitsgreatvalueinthenationaleconomyandindustrialmanufacturing.HowtoclassifyAlalloyrapidlyandaccuratelyisasignificant,popularandmeaningfultask.Classificationmethodsbasedonlaser-inducedbreakdownspectroscopy(LIBS)havebeenreportedinrecentyears.AlthoughLIBSisanadvanceddetectiontechnology,itisnecessarytocombineitwithsomealgorithmtoreachthegoalofrapidandaccurateclassification.Asanimportantmachinelearningmethod,therandomforest(RF)algorithmplaysagreatroleinpatternrecognitionandmaterialclassification.ThispaperintroducesarapidclassificationmethodofAlalloybasedonLIBSandtheRFalgorithm.TheresultsshowthatthebestaccuracythatcanbereachedusingthismethodtoclassifyAlalloysamplesis98.59%,theaverageofwhichis98.45%.ItalsorevealsthroughtherelationshiplawsthattheaccuracyvarieswiththenumberoftreesintheRFandthesizeofthetrainingsamplesetintheRF.Accordingtothelaws,researcherscanfindouttheoptimizedparametersintheRFalgorithminordertoachieve,asexpected,agoodresult.TheseresultsprovethatLIBSwiththeRFalgorithmcanexactlyclassifyAlalloyeffectively,preciselyandrapidlywithhighaccuracy,whichobviouslyhassignificantpracticalvalue.