자료구조, 이진결정트리, 트리
- 최초 등록일
- 2016.06.07
- 최종 저작일
- 2016.06
- 11페이지/ 한컴오피스
- 가격 5,000원
* 본 문서는 한글 2005 이상 버전에서 작성된 문서입니다.
한글 2002 이하 프로그램에서는 열어볼 수 없으니, 한글 뷰어프로그램(한글 2005 이상)을 설치하신 후 확인해주시기 바랍니다.
목차
없음
본문내용
//create the new decision tree object
DecisionTree* NewTree = new DecisionTree();
//add root node the very first 'Question' or decision to be made
//is monster health greater than player health?
NewTree->CreateRootNode(1);
//add nodes depending on decisions
//2nd decision to be made
//is monster strength greater than player strength?
NewTree->AddNode1(1, 2);
//3rd decision
//is the monster closer than home base?
NewTree->AddNode2(1, 3);
//depending on the weights of all three decisions, will return certain node result
//results!
//Run, Attack,
NewTree->AddNode1(2, 4);
NewTree->AddNode2(2, 5);
NewTree->AddNode1(3, 6);
NewTree->AddNode2(3, 7);
//Others: Run to Base ++ Strength, Surrender Monster/Player,
//needs to be made recursive, that way when strength++ it affects decisions second time around DT
//display information after creating all the nodes
//display the entire tree, i want to make it look like the actual diagram!
NewTree->Output();
//ask/answer question decision making process
NewTree->Query();
참고 자료
없음