15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

390<br />

Taking Action on Trees<br />

10<br />

8<br />

12<br />

Sub-tree<br />

7<br />

4<br />

9<br />

11<br />

19<br />

2<br />

35<br />

10<br />

Figure 5-15:<br />

Grafting a<br />

sub-tree<br />

can require<br />

rearranging<br />

the entire<br />

modified<br />

tree.<br />

2<br />

4<br />

8<br />

7<br />

9<br />

11<br />

12<br />

19<br />

35<br />

Grafting a sub-tree can<br />

require rearranging nodes.<br />

Possible computer move<br />

Figure 5-16:<br />

A tree can<br />

help a<br />

computer<br />

plan its next<br />

move.<br />

Best possible human responses<br />

Best possible computer responses

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!