Games and Artificial Intelligence Prof. drs. Dr. L.J.M.Rothkrantz • Artificial players (bots, Quake) • Route finding • Sharing emotion June 17, 2022 1
Jan 08, 2016
Games and Artificial IntelligenceProf. drs. Dr. L.J.M.Rothkrantz
• Artificial players (bots, Quake)• Route finding• Sharing emotion
April 20, 2023 1
Quake III Arena Bot
J.M.P. van Waveren (id-SOFTWARE)L.J.M. Rothkrantz
Delft University of TechnologyDelft
Contents
• Introduction• Requirements• Bot architecture• Subsystems• Conclusion
All about what makes
my clock tick.
Introduction
Who am I ?
What game do I
play ?
Introduction
• Quake 1 (Omicron bot)• Quake 2 (Gladiator bot)• Quake 3 Arena• Hired by Software
• Introduction• Requirements• Bot architecture• Subsystems• Conclusion
What do we need? Guns, lots of guns!
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
• Introduction• Requirements• Bot architecture• Subsystems• Conclusion
Hey now! I’m more than just bones!
Bot architecture
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoals Navigation
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Bot architecture(information flow)
4th
3rd
2nd
1st
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
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
IntroductionIntroduction RequirementsRequirements Bot architectureBot architecture SubsystemsSubsystems ConclusionConclusion
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
Basic Actions
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Area Awareness System
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Area Awareness System
Waypoint system
AASMaze
Area Awareness System
Area Awareness System
Area Awareness System
• Quake3 maps much more complex than maze• Multi-level routing algorithm• Areas grouped in clusters.
Navigation
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Navigation
Bot Characters
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
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.
Goal Selection
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Goal Selection
?
Fuzzy weight = 0.8
Fuzzy weight = 0.5
Fuzzy weight = 0.7
Communication with chats
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Communication with chats
• Generating chat messages• Interpreting chat messages• Synonyms• Match templates
Communication with chats(match templates)
Grunt get the rocket launcher.
<variable> get the <variable>
Grunt get the rocket launcher.
Grunt rocket launcher.
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?
AI Network
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
AI Network
Seek Long TermGoal
Seek Short TermGoal
Seek ActivateEntity
RespawnStand
Battle Fight Battle Chase Battle RetreatBattle Short Term
Goal
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.
Miscellaneous AI
Team leader AI
Misc. AI AI Network Commands
CharacterFuzzy ChatsGoalsNavigatio
n
Area Awareness System Basic Actions
4th
3rd
2nd
1st
Fighting behaviour
• Acquiring enemies (visibility/audibility)• Selecting weapons (fuzzy logic)• Aiming at the enemy• Taking position and avoiding projectiles
Obstacles & Puzzles
IntroductionIntroduction RequirementsRequirements Bot architectureBot architecture SubsystemsSubsystems ConclusionConclusion
I rock!
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.
Future directions
• Better anticipation of enemies• Environment analysis• Planning
You’re saying
you can
improve me?
A location based approach to distributed world-knowledge in mobile ad-hoc networks
ManetLoc
L.J.M.Rothkrantz, M. van Velden, D. Datcu
Agenda
• Introduction• Problem description• Implementation: ManetLoc• Demonstration• Future work• Questions
2. Without pre-setup infrastructure
• Unavailable• Wired network • GSM• GPS
• Available• PDA• Mobile Adhoc Networking (MANET)
3. Without pre-knowledge
?
• World model needed to solve problems• Crisis state• Locations
• Individuals• Exits
4. Process location information
• Input• User• Sensors• Other
• Output• World model
5. Fuse location information
• Match• Merge
6. Distributed
• No central server• Ad-hoc communication
• WiFi• Bluetooth
Implementation
• ManetLoc• Simulation• Based on AHS• Rectilinear world
• Intersections• Edges• Exits
Modules
• Exploration• Mapping• Distributing• Matching• Merging• Agent services
Exploration and mapping
• User input• Sensory data• World model• Closing loops
Guidance Take step(s)
Observe & reportUpdate world model
UserAgent
Distributing
A
B
C
B
A
C
• Check if useful• Convert to interpretable string• Broadcast
Matching
• Vertex matching• Growing hypotheses• Combining hypotheses
?
Map A
Map B
Possible Hypotheses
.
...
..
Merging
• Rotate • Shift • Add new vertexes • Connect
+ +
Map A Map B Selected Hypothesis Merged Map
Match
Merge
DeleteHyp?
Agent services
• Guidance• Exploration• Nearest exit
Results
• Tests• Usability• Correctness• Completeness• Performance
• Concept works• Better results for larger worlds• Most gain in pre-explored world
Future work
• Real life system• Input
• NLP• Iconic
• Data distribution• Dynamic data• Levels of detail• Planning• Execution
Questions
?
March 27, 2008
55
Emotion recognition using brain activity
Master thesis presentation
Robert Horlings
Media and Knowledge Engineering
April 20, 2023 56
Emotion
• Important in human communication• Influences decisions and behavior
Brain computing
• Direct information about emotion or brain processes.
• Applications such as• text writing• playing pong• moving mouse pointer
April 20, 2023 57
Emotion recognition
• From speech, text, facial expressions• Focus: brain activity
April 20, 2023 58
Applications
• Psychologists/doctors• Computer behavior depending on the user’s
emotion• Assisting patients with severe muscle diseases
April 20, 2023 59
Goal
Create a system for emotion recognition using brain activity and assess the quality of this emotion recognition in practice
April 20, 2023 60
Outline
• Brain activity• Emotion• Emotion and brain activity• Emotion recognition system• EEG recordings• Results• Demonstration• Conclusions
April 20, 2023 61
Brain activity
• Electroencephalography (EEG)• Measurement of brain activity• Small electric current
• Noise • Artifacts
April 20, 2023 62
Brain activity frequencies
• Splitting into different frequencies• Frequency bands with
specific characteristics
April 20, 2023 63
Emotion models
April 20, 2023 64
Emotion in brain activity
April 20, 2023 65
• Limbic system
• Difference between two hemispheres• Different frequencies
System
April 20, 2023 66
System structure
April 20, 2023 67
Preprocessing
April 20, 2023 68
Feature extraction
April 20, 2023 69
Seconds
Classification
April 20, 2023 70
Classification
April 20, 2023 71
EEG recordings
April 20, 2023 72
Emotion eliciting
April 20, 2023 73
Self assessments
April 20, 2023 74
Experimental design
April 20, 2023 75
Results
April 20, 2023 76
Results
Valence 100%
Arousal 93%
April 20, 2023 77
Results with new samples
April 20, 2023 78
Valence 32%
Arousal 37%
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%
Demonstration
April 20, 2023 80
Conclusions
• Emotions can be recognized from EEG signals• Much background noise
• Extremes on both dimensions work best
April 20, 2023 81
Future work
• Measuring more data• Investigate new techniques
April 20, 2023 82