Créer un compteSe connecter
import random
import numpy as np
from keras.models import Sequential
from keras.layers import Dense

technologies = {
'Préhistoire': 'Outil en pierre',
'Antiquité': 'Roue',
}

defis = {
'Préhistoire': 'Survie',
'Antiquité': 'Construction',
}

map_size = 100
pop_size = 1000
resource_names = ['food', 'water']

economy = {name: [[0]*map_size for _ in range(map_size)] for name in resource_names}
population = [['']*map_size for _ in range(map_size)]
npc_population = []


class NPC:
def __init__(self, name, age, location):
self.name = name
self.age = age
self.location = location
self.inventory = {name: 0 for name in resource_names}

def act(self):
pass

def die(self):
pass


class Golem:
def __init__(self, location):
self.location = location


def generate_golems():
return [Golem((random.randint(0, map_size - 1), random.randint(0, map_size - 1))) for _ in range(random.randint(1, 10))]


def simuler_comportements_humains():
modele = Sequential([
Dense(64, activation='relu', input_dim=10),
Dense(64, activation='relu'),
Dense(1, activation='sigmoid')
])
modele.compile(optimizer='rmsprop', loss='binary_crossentropy', metrics=['accuracy'])
donnees_entree = np.random.rand(1000, 10)
donnees_sortie = np.random.randint(2, size=(1000, 1))
modele.fit(donnees_entree, donnees_sortie, epochs=10, batch_size=32)


def main():
for i in range(pop_size):
npc_population.append(NPC("NPC {}".format(i), random.randint(16, 80), (random.randint(0, map_size - 1), random.randint(0, map_size - 1))))
golems = generate_golems()
simuler_comportements_humains()


if __name__ == "__main__":
main()

:chat_lunettes:
il y a 3 ans
:Hanz:
il y a 3 ans-PEMT
Si vous voulez changer vos caractéristiques de golem
:chat_lunettes:


golem = Golem(location=(0,0))
print(golem.strength, golem.agility, golem.intelligence)

golem.modify_characteristics(strength=20, agility=5)
print(golem.strength, golem.agility, golem.intelligence)
il y a 3 ans-PEMT
Seneque
Seneque
3 ans
import random
import numpy as np
from keras.models import Sequential
from keras.layers import Dense

technologies = {
'Préhistoire': 'Outil en pierre',
'Antiquité': 'Roue',
}

defis = {
'Préhistoire': 'Survie',
'Antiquité': 'Construction',
}

map_size = 100
pop_size = 1000
resource_names = ['food', 'water']

economy = {name: [[0]*map_size for _ in range(map_size)] for name in resource_names}
population = [['']*map_size for _ in range(map_size)]
npc_population = []


class NPC:
def __init__(self, name, age, location):
self.name = name
self.age = age
self.location = location
self.inventory = {name: 0 for name in resource_names}

def act(self):
pass

def die(self):
pass


class Golem:
def __init__(self, location):
self.location = location


def generate_golems():
return [Golem((random.randint(0, map_size - 1), random.randint(0, map_size - 1))) for _ in range(random.randint(1, 10))]


def simuler_comportements_humains():
modele = Sequential([
Dense(64, activation='relu', input_dim=10),
Dense(64, activation='relu'),
Dense(1, activation='sigmoid')
])
modele.compile(optimizer='rmsprop', loss='binary_crossentropy', metrics=['accuracy'])
donnees_entree = np.random.rand(1000, 10)
donnees_sortie = np.random.randint(2, size=(1000, 1))
modele.fit(donnees_entree, donnees_sortie, epochs=10, batch_size=32)


def main():
for i in range(pop_size):
npc_population.append(NPC("NPC {}".format(i), random.randint(16, 80), (random.randint(0, map_size - 1), random.randint(0, map_size - 1))))
golems = generate_golems()
simuler_comportements_humains()


if __name__ == "__main__":
main()

:chat_lunettes:
C'est le code de la gameboy pour aller sur la Lune ça
:chat_lunettes_gif:
Regardez Welcome to the NHK !!!!
il y a 3 ans
Scipio
Scipio
3 ans
C'est le code de la gameboy pour aller sur la Lune ça
:chat_lunettes_gif:
Non c’est beaucoup plus simple:

def aller_sur_la_lune(self):
if self.location == 'Terre':
self.location = 'Lune'
print("Le vaisseau est maintenant sur la Lune.")

:chat_lunettes:
il y a 3 ans
Seneque
Seneque
3 ans
Non c’est beaucoup plus simple:

def aller_sur_la_lune(self):
if self.location == 'Terre':
self.location = 'Lune'
print("Le vaisseau est maintenant sur la Lune.")

:chat_lunettes:
Tout nez que tromperi
Regardez Welcome to the NHK !!!!
il y a 3 ans
Le lead dev de l’univers
:chat_lunettes:
il y a 3 ans
if (OP = 'enculé') {
goto('goulag');
}
Total erezione
:Rocco:
il y a 3 ans
if ( npc == monkey){
set.location = South
construction.model = Herb
set.qi = random(1-50)
}

:risitas_ahi:
il y a 3 ans