[ Team LiB ] |
Planning MovesThe actual planning of moves turned out to be easier than I had anticipated. Each tank planned its moves on a simple system based on an incremental approach. It merely asked, "Would I be better off in one of the six adjacent hexes than in the one I'm in right now?" If so, it moved to that adjacent hex; otherwise, it remained in place. This required a calculation of the "tactical value" of each hex, which in turn depended on a number of factors. Each factor gave the hex a point value:
These simple rules were not by themselves good enough; I discovered that tanks would often oscillate between two hexes. So I added another rule that specified that, if the hex had been occupied recently, then it lost 4 points. That helped dampen out oscillatory movement. But there were still problems when the computer's tanks had not caught sight of any enemy tanks. I resolved this problem by two stratagems:
At the outset of the game, each tank took as its primary objective the geographic objective assigned to its team. The tanks would all move toward their secondary objectives, some of which would be to the right of the geographic objective, and some of which would be to the left of the objective. However, as soon as contact was made with the human, the computer tanks all modified their objectives. The sighted human tank became the primary objective, and each tank chose a secondary objective to flank the human tank on the right or the left, depending on the circumstances. Thus, the entire computer tank force began an encircling movement. As soon as a second human tank was sighted, the nearest computer tanks would modify their objectives to take it into account. And of course, if a tank was close enough to get a good shot at the human, he'd take it. |
[ Team LiB ] |
No comments:
Post a Comment