User interface language: English | Español

Date November 2020 Marks available 4 Reference code 20N.2.HL.TZ0.8
Level HL Paper 2 Time zone no time zone
Command term Explain Question number 8 Adapted from N/A

Question

Genetic algorithms are used to influence the behaviour of non-playing characters (NPCs) in role-playing games (RPGs). NPCs are computer-controlled characters that the player interacts with but does not control.

A series of generic NPCs are being developed for use in any multi-player RPG. The environmental and social interactions of these NPCs are being developed using supervised learning and will continue to develop as the game is played.

Once NPCs have completed their supervised training, they are placed in a dynamic game environment. Each NPC learns to adapt its behaviour to its environment.

At this stage of the training, NPCs will not be verbally communicating with other characters in their environment.

Outline two advantages of developing NPCs using genetic algorithms.

[4]
a.

Explain how supervised learning of a genetic algorithm could be used to support the way NPCs learn.

[6]
b.

Describe the way an NPC in a game could adapt its behaviour when moving and interacting with its environment.

[6]
c.

The last stage of NPC development is verbal communication with player characters and other NPCs. To assist with this process, it was decided to explore research related to chatbots.

Explain the benefits of giving NPCs the functionality of chatbots.

[4]
d.

Markscheme

Award [4 max].
No need to anticipate and code in advance the reactions that NPCs need to display;
since the supervised training will ensure the characters can adapt their responses;

Save programmers development time;
because NPCs can be used in similar RPG games;

Provides greater game realism;
NPC characters would evolve to behave more like real people;

NPCs would remember previous encounters with players;
thus, altering their gameplay rather than running through a loop;

Mark as 2 + 2

a.

Award [6 max].
Start with a set of “units” (here, NPCs) with some predetermined code/behaviour with added randomness / genetic algorithms work successively towards a solution from a starting point;
Apply a process of selection to the units, so that the probability of survival depends on their success against some predetermined criteria;
Supervised learning has training data with a known set of responses to a known set of problems;
The fitness function (defined by the programmers) limits the adaptability of a given population of NPCs to the skills or tasks defined by the fitness function;
A (fitness) function is used to measure the effectiveness of a solution / offspring (respawned NPCs) are evaluated using a fitness function;
The best solutions are retained / worse solutions are discarded / the most adaptive NPCs will remain in the population and others removed (die);
The retained solutions are mutated (randomness) to generate another set of solutions / retained NPCs are mutated and respawned / recloned;
This process is repeated until the best solution is identified / repeated until the most adaptable NPC model is identified;

Accept other reasonable reasons or examples.

b.

Award [6 max].
The NPC makes a random set of moves;
Records the location/identity of objects relative to its current position;
Building up a map of identifyable surrounding objects;
This is repeated until all objects in the space have been placed in distance and direction from a starting point;
The NPC would learn how to react to the object (e.g. swim in a river / walk on a path);
NPC would learn where it could walk and where it could not (e.g. river would need to be avoided);
NPCs that die could be regenerated from ones that had avoided dying up to that point in the game;
NPC would adapt to a changing environment e.g. a house built in a game;

c.

Award [4 max].
Chatbots are designed to output language in response to human language;
Most NPC conversations are scriptive speeches / repetitive…
so using chabots will add more realism to the game;
NPCs could verbally communicate in script or sound form;
There would still need to be some hardcoded responses that relate to the game storyline;
Natural language processing (NLP) could be applied to chatbot conversations;

d.

Examiners report

[N/A]
a.
[N/A]
b.
[N/A]
c.
[N/A]
d.

Syllabus sections

Option B: Modelling and simulation » B.4 Communication modelling and simulation
Show 29 related questions
Option B: Modelling and simulation

View options