New Post

Nash Equilibrium In Game Theory ~xRay Pixy

Image
 Video Link  CLICK HERE... Learn Nash Equilibrium In Game Theory Step-By-Step Using Examples. Video Chapters: Nash Equilibrium  00:00 Introduction 00:19 Topics Covered 00:33 Nash Equilibrium  01:55 Example 1  02:30 Example 2 04:46 Game Core Elements 06:41 Types of Game Strategies 06:55  Prisoner’s Dilemma  07:17  Prisoner’s Dilemma Example 3 09:16 Dominated Strategy  10:56 Applications 11:34 Conclusion The Nash Equilibrium is a concept in game theory that describes a situation where no player can benefit by changing their strategy while the other players keep their strategies unchanged.  No player can increase their payoff by changing their choice alone while others keep theirs the same. Example : If Chrysler, Ford, and GM each choose their production levels so that no company can make more money by changing their choice, it’s a Nash Equilibrium Prisoner’s Dilemma : Two criminals are arrested and interrogated separately. Each has two ...

Python For Beginners - Python Basics

PYTHON FOR BEGINNERS

# Variables: Used to hold Values

x = 200

y = 2

z = x+y

print(z)

OUTPUT: 202

# Careating Strings in Python

r = 'Create stings'

print(r)

d = 'Don\'t Give Up'

print(d)

OUTPUT  
Create stings

Don't Give Up
#Hold Values in Strings
val = 50
disp = 'My Value is %s'
print(disp % val)
OUTPUT: My Value is 50


#placeholder different variables - replace stings
msg = '%s: Python is good'
msg2 = '%s: Yes'
c1 = 'Roy'
c2 = 'Jhon'
print(msg % c1)
print(msg2 % c2)

OUTPUT  
Roy: Python is good
Jhon: Yes

#Hold Multiple Values 
Hold= 'Add %s and %s'
num1 = 23
num2 = 65
print(Hold % (num1,num2))
OUTPUT: Add 23 and 65

#String Multiplication
print(3 * 'R')
OUTPUT: RRR

#How to use Space/Tab
Space = ' ' * 10
print('%s Hello' % Space)
print()
print('%s Life = Peace' % Space)

OUTPUT  : 
           Hello

           Life = Peace

#Create a String List and access Values from it.
SimpleList = ('Peace, Smile, Nature, Birds, Animals')
#Display My List
print(SimpleList)
OUTPUT: Peace, Smile, Nature, Birds, Animals

MyList = ['Peace', 'Smile', 'Nature', 'Birds', 'Animals']
print(MyList[2])

OUTPUT: Nature
print(MyList[1:3])
OUTPUT: ['Smile', 'Nature']

#Add a new item to the List
MyList.append('Care')
print(MyList)
OUTPUT : ['Peace', 'Smile', 'Nature', 'Birds', 'Animals', 'Care'] 

#Remove Item from List
del MyList[4]
print(MyList)
OUTPUT : ['Peace', 'Smile', 'Nature', 'Birds', 'Care'] 

#Join Multiple List
L1 = ['Math Digits']
L2 = [0,1,2,3,4,5,6,7,8,9]
print(L1 + L2)

OUTPUT : ['Math Digits', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 

#IF Else Statements
#Indentation: use same number of spaces else indentation error will occur
a = 10;
if (a>=50):
    print('a is Greater')
else:
    print('a is less than 50')

OUTPUT: a is less than 50

#IF and ElseIF statement
b = 10;
if (b>=50):
    print('b is Greater')
elif (b == 50):
    print('b is equal to 50')
else:
    print('b is less than 50')

OUTPUT: b is less than 50

#Conditions Combination
c = 12
if (c<=5 or c>= 10):
    print('Today is Your Birthday')
    print('Happy Birthday To You :)')
else:
    print('Every Day is New Day!')

OUTPUT: 
Today is Your Birthday
        Happy Birthday To You :)

#FOR LOOP: Print any String Multiple Time
for x in range (0,5):
    print('Good Day!')

OUTPUT: 
Good Day!
Good Day!
Good Day!
Good Day!
Good Day!

#FOR LOOP: Print String and Values
for x in range (0,3):
    print('Student %s' % x)

OUTPUT: 
Student 0
Student 1
Student 2

#Display Color List
ListC = ['red','black','green','blue','yellow']
for r in ListC:
    print(r)

OUTPUT: 
red
black
green
blue
yellow

#While Loop
x = 5
y = 32
while (x<16 and y<65):
    x = x+5
    y = y+6
    print(x,y)
OUTPUT:
10 38
15 44
20 50

#Function in Python: Name, Parameter, and Body
def fun(name):
    print('Hello %s' % name)

#Function Calling
fun('Roxy')

OUTPUT: Hello Roxy

#Variable and Scope
def var():
    v1 = 2
    v2 = 3
    return v1*v2
print(var())

OUTPUT: 6

#Time
import time
print(time.asctime())

OUTPUT: Wed Oct  5 13:31:04 2022






Comments

Popular Post

PARTICLE SWARM OPTIMIZATION ALGORITHM NUMERICAL EXAMPLE

Cuckoo Search Algorithm for Optimization Problems

Particle Swarm Optimization (PSO)

PSO (Particle Swarm Optimization) Example Step-by-Step

how is the LBP |Local Binary Pattern| values calculated? Step-by-Step with Example

PSO Python Code || Particle Swarm Optimization in Python || ~xRay Pixy

Grey Wolf Optimization Algorithm

Bat algorithm Explanation Step by Step with example

Grey Wolf Optimization Algorithm Numerical Example

Whale Optimization Algorithm Code Implementation || WOA CODE || ~xRay Pixy