games and artificial intelligence prof. drs. dr. l.j.m.rothkrantz

82
Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz Artificial players (bots, Quake) Route finding Sharing emotion June 17, 2022 1

Upload: lorna

Post on 08-Jan-2016

21 views

Category:

Documents


0 download

DESCRIPTION

Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz. Artificial players (bots, Quake) Route finding Sharing emotion. Quake III Arena Bot. J.M.P. van Waveren (id-SOFTWARE) L.J.M. Rothkrantz Delft University of Technology Delft. Contents. All about what makes my clock tick. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Games and Artificial IntelligenceProf. drs. Dr. L.J.M.Rothkrantz

• Artificial players (bots, Quake)• Route finding• Sharing emotion

April 20, 2023 1

Page 2: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Quake III Arena Bot

J.M.P. van Waveren (id-SOFTWARE)L.J.M. Rothkrantz

Delft University of TechnologyDelft

Page 3: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Contents

• Introduction• Requirements• Bot architecture• Subsystems• Conclusion

All about what makes

my clock tick.

Page 4: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Introduction

Who am I ?

What game do I

play ?

Page 5: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Introduction

• Quake 1 (Omicron bot)• Quake 2 (Gladiator bot)• Quake 3 Arena• Hired by Software

Page 6: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

• Introduction• Requirements• Bot architecture• Subsystems• Conclusion

What do we need? Guns, lots of guns!

Page 7: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Requirements

• Hard to distinguish from human player• Same game rules apply to bots and humans• Not allowed to cheat• Different bot characters• Play team games• Resource efficient (CPU & memory)• Commercial quality code• Easy extendable/modifiable architecture and

implementation

Page 8: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

• Introduction• Requirements• Bot architecture• Subsystems• Conclusion

Hey now! I’m more than just bones!

Page 9: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Bot architecture

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoals Navigation

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 10: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Bot architecture(information flow)

4th

3rd

2nd

1st

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

Page 11: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Bot architecture(integration with game engine)

Game

Server

Client

Client Game

Renderer

Bot Lib (1st & 2nd layer)

Bot AI (3rd & 4th layer)

networking

Client code providing the IO functionality for human players

3D image

Player input

Sound

Page 12: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

IntroductionIntroduction RequirementsRequirements Bot architectureBot architecture SubsystemsSubsystems ConclusionConclusion

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

Page 13: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Basic Actions

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 14: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Area Awareness System

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 15: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Area Awareness System

Waypoint system

AASMaze

Page 16: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Area Awareness System

Page 17: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Area Awareness System

Page 18: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Area Awareness System

• Quake3 maps much more complex than maze• Multi-level routing algorithm• Areas grouped in clusters.

Page 19: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Navigation

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 20: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Navigation

Page 21: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Bot Characters

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 22: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Bot Characters(characteristics)

   Name Name of the bot.

Gender Gender of the bot ( male, female, it – mechanical creature ).

Attack skill How skilled the bot is when attacking.

Weapon weights File with weapon selection fuzzy logic.

View factor Scale factor for difference between current and ideal view angle to view angle change.View max change Maximum view angle change per second.

Reaction time Reaction time in seconds.

Aim accuracy Accuracy when aiming, a value between 0 and 1 for each weapon.

Aim skill Skill when aiming, a value between 0 and 1 for each weapon.

Chats File with individual bot chatter.

Characters per minute How fast the bot types.

Chat tendencies Tendencies to use specific chats when things happen.

Croucher Tendency to crouch.

Jumper Tendency to jump.

Walker Tendency to walk instead of run.

Weapon jumper Tendency to rocket jump.

Item weights File with item goal selection fuzzy logic.

Aggression Aggression of the bot.

Self preservation Self preservation of the bot.

Vengefulness How likely the bot is to take revenge.

Camper Tendency to camp.

Easy fragger Tendency to go for cheap kills.

Alertness How alert the bot is.

Fire throttle Tendency to fire continuously instead of pausing between shots.

Page 23: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Goal Selection

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 24: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Goal Selection

?

Fuzzy weight = 0.8

Fuzzy weight = 0.5

Fuzzy weight = 0.7

Page 25: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Communication with chats

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 26: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Communication with chats

• Generating chat messages• Interpreting chat messages• Synonyms• Match templates

Page 27: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Communication with chats(match templates)

Grunt get the rocket launcher.

<variable> get the <variable>

Grunt get the rocket launcher.

Grunt rocket launcher.

Page 28: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Communication with chats(Eliza chats)

MrElusive: this game is fun!

Bot: are we having fun?

MrElusive: I like to shoot things.

Bot: I like to shoot things too.

MrElusive: I’m going to shoot you.

Bot: I don’t believe you are going to shoot me.

MrElusive: just wait and see!

Bot: don’t wait.

MrElusive: you are history when I find you

Bot: maybe I’m history when you find me, and maybe not.

MrElusive: be afraid.

Bot: are you afraid of big, mean gooses?

Page 29: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

AI Network

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 30: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

AI Network

Seek Long TermGoal

Seek Short TermGoal

Seek ActivateEntity

RespawnStand

Battle Fight Battle Chase Battle RetreatBattle Short Term

Goal

Page 31: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

AI Network(Seek LTG node example)

• Am I dead? If so go to ‘respawn’ node.• Is there an enemy I want to fight with? If so go to the ‘battle flight’

node.• If I reached my long term goal select new long term goal.• If there is a short goal go to the ‘seek short term goal’ node.• Predict obstacles that need to be handled (doors opened with buttons).• Navigate towards long term goal.• If I am blocked figure out how to deal with the obstacle.

Page 32: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Miscellaneous AI

Team leader AI

Misc. AI AI Network Commands

CharacterFuzzy ChatsGoalsNavigatio

n

Area Awareness System Basic Actions

4th

3rd

2nd

1st

Page 33: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Fighting behaviour

• Acquiring enemies (visibility/audibility)• Selecting weapons (fuzzy logic)• Aiming at the enemy• Taking position and avoiding projectiles

Page 34: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Obstacles & Puzzles

Page 35: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

IntroductionIntroduction RequirementsRequirements Bot architectureBot architecture SubsystemsSubsystems ConclusionConclusion

I rock!

Page 36: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Conclusion

• Fairly good artificial player• Cannot be distinguished from human at first sight• Same game rules apply and the bot does not

cheat• Versatile set of bot characters• Plays team based game types• Communicates with other players (bot/human)• Resource efficient (AAS)• Easy extendable/modifiable architecture and

implementation. Several other games and mods use the bot AI base.

Page 37: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Future directions

• Better anticipation of enemies• Environment analysis• Planning

You’re saying

you can

improve me?

Page 38: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

A location based approach to distributed world-knowledge in mobile ad-hoc networks

ManetLoc

L.J.M.Rothkrantz, M. van Velden, D. Datcu

Page 39: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Agenda

• Introduction• Problem description• Implementation: ManetLoc• Demonstration• Future work• Questions

Page 40: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

2. Without pre-setup infrastructure

• Unavailable• Wired network • GSM• GPS

• Available• PDA• Mobile Adhoc Networking (MANET)

Page 41: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

3. Without pre-knowledge

?

• World model needed to solve problems• Crisis state• Locations

• Individuals• Exits

Page 42: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

4. Process location information

• Input• User• Sensors• Other

• Output• World model

Page 43: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

5. Fuse location information

• Match• Merge

Page 44: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

6. Distributed

• No central server• Ad-hoc communication

• WiFi• Bluetooth

Page 45: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Implementation

• ManetLoc• Simulation• Based on AHS• Rectilinear world

• Intersections• Edges• Exits

Page 46: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Modules

• Exploration• Mapping• Distributing• Matching• Merging• Agent services

Page 47: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Exploration and mapping

• User input• Sensory data• World model• Closing loops

Guidance Take step(s)

Observe & reportUpdate world model

UserAgent

Page 48: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Distributing

A

B

C

B

A

C

• Check if useful• Convert to interpretable string• Broadcast

Page 49: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Matching

• Vertex matching• Growing hypotheses• Combining hypotheses

?

Map A

Map B

Possible Hypotheses

.

...

..

Page 50: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Merging

• Rotate • Shift • Add new vertexes • Connect

+ +

Map A Map B Selected Hypothesis Merged Map

Match

Merge

DeleteHyp?

Page 51: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Agent services

• Guidance• Exploration• Nearest exit

Page 52: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Results

• Tests• Usability• Correctness• Completeness• Performance

• Concept works• Better results for larger worlds• Most gain in pre-explored world

Page 53: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Future work

• Real life system• Input

• NLP• Iconic

• Data distribution• Dynamic data• Levels of detail• Planning• Execution

Page 54: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Questions

?

Page 55: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

March 27, 2008

55

Emotion recognition using brain activity

Master thesis presentation

Robert Horlings

Media and Knowledge Engineering

Page 56: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

April 20, 2023 56

Emotion

• Important in human communication• Influences decisions and behavior

Page 57: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Brain computing

• Direct information about emotion or brain processes.

• Applications such as• text writing• playing pong• moving mouse pointer

April 20, 2023 57

Page 58: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Emotion recognition

• From speech, text, facial expressions• Focus: brain activity

April 20, 2023 58

Page 59: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Applications

• Psychologists/doctors• Computer behavior depending on the user’s

emotion• Assisting patients with severe muscle diseases

April 20, 2023 59

Page 60: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Goal

Create a system for emotion recognition using brain activity and assess the quality of this emotion recognition in practice

April 20, 2023 60

Page 61: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Outline

• Brain activity• Emotion• Emotion and brain activity• Emotion recognition system• EEG recordings• Results• Demonstration• Conclusions

April 20, 2023 61

Page 62: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Brain activity

• Electroencephalography (EEG)• Measurement of brain activity• Small electric current

• Noise • Artifacts

April 20, 2023 62

Page 63: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Brain activity frequencies

• Splitting into different frequencies• Frequency bands with

specific characteristics

April 20, 2023 63

Page 64: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Emotion models

April 20, 2023 64

Page 65: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Emotion in brain activity

April 20, 2023 65

• Limbic system

• Difference between two hemispheres• Different frequencies

Page 66: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

System

April 20, 2023 66

Page 67: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

System structure

April 20, 2023 67

Page 68: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Preprocessing

April 20, 2023 68

Page 69: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Feature extraction

April 20, 2023 69

Seconds

Page 70: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Classification

April 20, 2023 70

Page 71: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Classification

April 20, 2023 71

Page 72: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

EEG recordings

April 20, 2023 72

Page 73: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Emotion eliciting

April 20, 2023 73

Page 74: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Self assessments

April 20, 2023 74

Page 75: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Experimental design

April 20, 2023 75

Page 76: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Results

April 20, 2023 76

Page 77: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Results

Valence 100%

Arousal 93%

April 20, 2023 77

Page 78: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Results with new samples

April 20, 2023 78

Valence 32%

Arousal 37%

Page 79: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Improvements

April 20, 2023 79

Original

Valence 32%

Arousal 37%

Original Two classes1 – 5

Three classes1,2 – 3 – 4,5

Valence 32% 71% 37%

Arousal 37% 81% 49%

Page 80: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Demonstration

April 20, 2023 80

Page 81: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Conclusions

• Emotions can be recognized from EEG signals• Much background noise

• Extremes on both dimensions work best

April 20, 2023 81

Page 82: Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz

Future work

• Measuring more data• Investigate new techniques

April 20, 2023 82