VAIS - Virtual AI simulator
VAIS runs simulations of agents and players across multiple worlds
create a random world
# planet parameters are: num_seeds, width, height, wind, rain, sun, lava
p = planet.Planet('Test Planet', 5, 60, 45, 0.2, 0.20, 0.2, 0.5)
p.evolve(100)
print(p)
View the world
fldr = os.getcwd() + os.sep + 'data' + os.sep + 'worlds'
view_world.display_map(fldr + os.sep + 'ExamplePlanet.txt')
create a character manually
stats = {'Health':20,'max_health':20,'INT':8,'STA':5,'STR':2,'AGI':5}
c1 = character.Character( 'Jim', 'Orc', 'Mage', stats, ['cast'], 'Test', ['bag'])
print(c1)
CHARACTER = Jim
Race = Orc
Class = Mage
STATS = STA:5 AGI:5 INT:8 Health:20 max_health:20 STR:2
Story = Example char
SKILLS = cast
INVENTORY = bag
Create a 2nd random character and battle them
traits = character.CharacterCollection(character.fldr)
rules = battle.BattleRules('battle.rules')
c2 = traits.generate_random_character()
b = battle.Battle(c1, c2, traits, rules, print_console='Yes')
print(b.status + ' Wins')
Jim [100%] hits Crador [100%] for 4
Crador [80%] hits Jim [100%] for 4
Jim [80%] miss Crador [80%]
Crador [80%] hits Jim [80%] for 4
Jim [60%] CRIT Crador [80%] for 12
Crador [20%] hits Jim [60%] for 4
Jim [40%] hits Crador [20%] for 4
Jim Wins
Simulate 10,000 fights
sim = battle.BattleSimulator(c1, c2, traits, rules, 10000)
print(sim)
After 10000 fights Jim wins!
Jim = 9158 (92%)
Crador = 842 (8%)
Metadata
Release files for vais 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vais-0.0.7.tar.gz | 46.9 kB | Without provenance | Details for vais-0.0.7.tar.gz |
Release files / vais-0.0.7.tar.gz
| Download URL | vais-0.0.7.tar.gz |
|---|---|
| Size | 46.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
022d95bad7f5983e8278c6f161737d844d8596168ba8a30a4ebf9443d104cff7
|
|
BLAKE2b-256 checksum How to use checksums |
1898e44f4404e7fd4e9a8a82ea382eb5c5ed11609fc4073451d455c8374dff22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for vais 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.