ParticleSwarmOptimizationabout0/1KnapsackProblemAbstract:AsatypicalcombinatorialoptimizationprobleminOperationsResearch,knapsackproblemhasabroadbackgroundandmanydifferentwaystosolve.ThispaperprovidesamethodbasedonPSOandthismethodusessomeideasaboutGeneticAlgorithmtoapplyPSOinknapsackproblemandgainedbetterresults.KeyWords:KnapsackProblem;PSO[3],.[M].:,2006.[4],.0/1[J].,2005(10).[5].0/1[J].,2005(12).(:):(1975-),,,,,。(,451191):,、(A*),:,、。:;;;A*;:TP312:A:1672-7800(2009)06-0062-030,,,()(),,。:,。,,;,,,,A*。,,,、。1:3×31、2、3、4、5、6、7、8,。()(),1。1,。1,7。,4,、、、。(4)。,,。SoftwareGuide8%620096Vol.8No.6Jun.2009622.1。(1)———OPEN,OPEN,(FIFO),。(2)———OPEN,OPEN,(FILO),。2.2:(EvaluationFunction)f,,。:f*(n)=g*(n)+h*(n)(1)g*(n)sn;h*(n)ng;f*(n)sng。(2):f(n)=g(n)+h(n)(2)n。f(n)、g(n)h(n)f*(n)、g*(n)h*(n)3。f(n)=g(n)+h(n)OPENA。A,x,h(x)≤h*(x)(3),h(x)h*(x),。h*(x)h(x)A,A*。:f(n)=d(n)+p(n)(4)g(n)d(n),n(n)h(n)p(n),:(1);(2)。,(),。,。,(1),“”。(2)h(n)h*(n),,,,,。(1)(2),A*。(2):,,。,,,,h(n)A*。3VC++6.0,。,“”、“”、“A*()”、“A*()”。,,,。“A*()”,,。,。,AX_search():。AXX_search():。AXX_search():intEightGame::AXX_search(){e-child[n]=newEightGame;//e-child[n]-parent=e;e-child[n]-InitNode(m_order,m_emptyGrid);e-child[n]-fx_value();//fcount=open-GetCount();//countopenfor(inti=1;icount;i++)//open(open0){POSITIONpos=open-FindIndex(i);//poste1=(EightGame*)open-GetAt(pos);//pos//EightGame*te1if(te1-fe-child[n]-f){open-InsertBefore(pos,e-child[n++]);//break;}}//forif(count==open-GetCount())//open,//child[n]-f,open-AddTail(e-child[n++]);m_total++;//:63··2009TheSolutionandAnalysisofEightPuzzleProbleminArtificialIntelligenceAbstract:Withusingthedepth-firstsearch(DFS)andthebreadth-firstsearchandheuristicsearchalgorithms(suchasA*algorithm)tosolvetheeightpuzzleproblem,theperformanceofthesealgorithmsisanalyzed.Theresultsofexperimentsshowtheanalyticconclusionthatingeneralheuristicsearchalgorithmshavemoreconvenientandefficientthanblindingalgorithmsinthestatesspacesearch.KeyWords:Depth-firstSearch;Breadth-firstSearch;HeuristicSearch;A*Algorithm;EightPuzzleProblem………………returnm_total;}//AXX_search()AX_search(),EightGamef。4A*()2,,。2A*1,、()。1:1,,,,,。,,,,A*,。A*,“”“”,(),,,。5,。,,,。:[1],.[M].:,2004.[2].[J].,2007(6).[3].[M].:,2004.(:)1()()352041242258143489263A*:1254100A*:104490:“”64··