AI of spaceship's propulsion: land a 3D ship at position=0 and angle=0

前端 未结 4 1545
失恋的感觉
失恋的感觉 2020-12-13 04:03

This is a very difficult problem about how to maneuver a spaceship that can both translate and rotate in 3D, for a space game.

The spaceship has n jets

4条回答
  •  半阙折子戏
    2020-12-13 04:37

    For these kind of problems there are two techniques available: bruteforce search and heuristics. Bruteforce means to recognize the problem as a blackbox with input and output parameters and the aim is to get the right input parameters for winning the game. To program such a bruteforce search, the gamephysics runs in a simulation loop (physics simulation) and via stochastic search (minimax, alpha-beta-prunning) every possibility is tried out. The disadvantage of bruteforce search is the high cpu consumption.

    The other techniques utilizes knowledge about the game. Knowledge about motion primitives and about evaluation. This knowledge is programmed with normal computerlanguages like C++ or Java. The disadvantage of this idea is, that it is often difficult to grasp the knowledge.

    The best practice for solving spaceship navigation is to combine both ideas into a hybrid system. For programming sourcecode for this concrete problem I estimate that nearly 2000 lines of code are necessary. These kind of problems are normaly done within huge projects with many programmers and takes about 6 months.

提交回复
热议问题