[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
Let's play a stupid game.
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 279
Thread images: 34
File: infected.png (20 KB, 802x798) Image search: [iqdb] [SauceNao] [Google]
infected.png
20 KB, 802x798
Let's play a stupid game.
Here we have a town with 5000 happy individuals. 10 of them are world-renowned doctors.
Three of them however are having a bad day and have been infected with a very contagious disease.
The infected have a 75% chance of performing an action, the action depends on a few things.
First of all, they can only look to the left, right, in front and behind them. Let's just say
>pic related
is a birds eye-view of the town. They're very uniformed.

Anyway, if they choose to do an action, they choose a random direction to do it in (25%). If in the direction they choose is a healthy citizen, they will become infected. However if their action is towards a doctor, one of four things will happen.

>The doctor will die
>The infected will die
>The doctor will become infected
>The infected will be astoundingly cured and trained by literally the worlds best doctor. Ever. (i.e. become doctor)

From what I've gathered, there is no chance to survive, make your time. I've been running the simulation assigning the 10 doctors and three infected to random locations. I'm going to let you guys choose where to place them. Let's see who survives the longest.

Once that gets boring, I'll be open to suggestions, variable tweaks and so-on.
Give me locations in an X,Y format where you'd like the ten units to be placed.
I'll run your simulation and post the resulting picture.
If at any time your citizen count drops below 20, the simulation ends.
The board is x50 by y100.
>>
>>43505737
but what about research? the possibility of someone finding a cure/vaccination
>>
>>4350573
{(5, 10), (10, 20), (15, 30), (20, 40), (25, 50), (30, 60), (35, 70), (40, 80), (45, 90), (12, 98)}
>>
>>43505802
It moves too fast.

>>43505816
Which are doctors which are infected?
>>
>>43505826
All 10 are doctors, you can random the infected
>>
File: Untitled.png (19 KB, 800x834) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
19 KB, 800x834
>>43505836
>>
>>43505737

{(20, 20), (30, 30), (20, 30), (30, 20), (22, 22), (28, 28), (22, 28), (28, 22), (25, 25), (26,26)}

We can make it.
>>
File: Untitled.png (17 KB, 802x833) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
17 KB, 802x833
>>43505928
>>
>>43505737
This looks interesting OP.
I might go and make something like this too.
>>
>>43505890
Infected: {(0, 0), (0, 1), (1, 0)}
Doctors: {(0, 2), (1, 1), (2, 0), (0, 3), (1, 2), (2, 1), (3, 0), (1, 3), (2, 2), (3, 1)}

A suggestion: Give doctors %10 chance to make a person in a random direction a doctor, and a %5 chance to make one person in a 5x5 area around him a doctor
>>
>>43505890
>>43505967
What are the X's?
>>
>>43505737
>no doctors on the right side
right side confirmed for third world
>>
>>43506023
From what I understand
D: Doctor
I: Infected
O: Ordinary Citizen
X: Dead
>>
>>43505737
Does the world wrap around on the edges?

You could try
DD
DDD
IDDD
IIDD

in the bottom left hand corner.
>>
OP are you using ncurses?
How are you getting the colored characters?
>>
File: Untitled.png (17 KB, 805x832) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
17 KB, 805x832
>>43506023
>>43506040

>>43506026
Haha

>>43506011
Thanks for 0-based input, minus one is too complicated for me when I'm as sick as I am.
>>
>>43506069
Term::ANSIColor

>>43506066
Only left and right.

gonna go for a quick smoke, brb
>>
>>43506099
 DD
DDIDD
DDIIDD

along the bottom somewhere
>>
>>43506163
xy it
>>
>>43506099
>Wraps around left and right.
I didn't think of that when I holed up the infected on top left.

>>43506163
I was thinking of something like
DDIIIDD
DDDDD
D

Infected: {(0, 49), (0, 50), (0, 51)}
Doctors: {(0, 47), (0, 48), (0, 52), (0, 53), (1, 48), (1, 49), (1, 50), (1, 51), (1, 52), (2, 50)}
>>
File: Untitled.png (18 KB, 803x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
18 KB, 803x831
>>43506066
>>
>>43506240
Did I fuck up the order of X and Y?
Infected: {(49, 0), (50, 0), (51, 0)}
Doctors: {(47, 0), (48, 0), (52, 0), (53, 0), (48, 1), (49, 1), (50, 1), (51, 1), (52, 1), (50, 2)}
>>
File: Untitled.png (17 KB, 801x828) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
17 KB, 801x828
>>43506240
>>
>>43505737
In which order are moves processed. If I have a doctor with 4 surrounding infected, does the doctor get a chance to cure all 4, or will he be subject to the roll on the first infected to interact with him?
>>
Doesn't look like there's any chance of them surviving OP.
>>
File: Untitled.png (17 KB, 802x828) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
17 KB, 802x828
>>43506389
It cycles through line by line. [0][0], [0][1] ... [49][99]
>>43506423
Me neither. Suggestions on what to add?
>>43506289
>>
>>43506446
More doctors. Do the dead people block doctors? In all results they seem trapped by the corpses of those who they couldn't help.
And source code.
>>
>>43506389
Oh, sorry, missed most of that question.
Moves are only process if it's an infected's turn.
>>
>>43506446
It cycles through line by line. [0][0], [0][1] ... [49][99]
Why not do have a temp array a la game of life?
>>
>>43506446
Decrease the rate of infection.
Increase the rate of cure.
>>
>>43506464
Yes bodies block. Thought about something which revives bodies into doctors or civs. Maybe doctors could do this and I could knock everything down to 20%.

>>43506478
Doctors only cure if a zombie does an action towards them
>>
>>43506473
The board is generated at the beginning with two for-loops. after that, it's just element substitution.
>>
>>43506489
>Doctors only cure if a zombie does an action towards them
Then just decrease the rate of infection.
>>
>>43506489
Let doctors create other doctors with a low chance
>>
How about...
Hm. Doctors have a chance to revive and upon reviving the revived has a chance to be an angel or something, marked with an A. Angels have a 20% chance to create a doctor and an 80% chance to revive a body into a healthy civ?
>>43506512
That's what happens.
>>
http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
>>
Did you make it? What programming language?
>>
>>43506529
Regardless of map position I mean.
>>43506536
perl :)
>>
>>43506506
Yes, what I'm saying is you might have more interesting results if you have a temporary array in which to store the outcomes of each move. that way, a doctor gets its full chance to interact with its adjacent people.
>>
>>43506529
They only have a chance of making doctors if the infected attack them, what I mean is letting doctors turn ordinary people into doctors without being attacked.
>>
>>43506568
Okay gimme a few.
>>
Every turn or step, there is a 1% chance that a citizen will do something productive with his life and become a doctor, the people around doctors get inspired by them and have a 5% chance.
>>
>>43506558
There's still a couple things I need to work on, but MUCH better results!
>>
File: Untitled.png (39 KB, 802x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
39 KB, 802x831
>>43507003
derp
>>
DON'T REPLY TO THIS THREAD.
OP IS THE EBOLA AND HE WANTS HELP FOR KILLING PEOPLE.

EYY BOLA
Y
Y

B
O
L
A
>>
>>43507028
>>43507003
Nice one. What have you written it in? Wouldn't mind seeing your source.
>>
>>43507188
Perl. Might post source later.
>>
What if ordinary citizens have a small chance to become doctors without interacting with one? And maybe infected have a small chance of healing naturally and being immune from the disease
>>
>>43507028
Infected actioning on corpses should remove them
>>
File: Untitled.png (38 KB, 804x832) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
38 KB, 804x832
>>43507427
With the addition to doctors being able to convert without an action towards them, there's enough doctors. We need to do something about the bodies though, otherwise doctors get trapped. See pic.

>>43507494
What should they change to
>>
>>43507531
>What should they change to
Empty space

I'm not really sure why the original doesn't have empty space and movement.

If you don't feel like adding that, change them into infected, zombie style.
>>
Maybe it can be first come first serve type deal. If an infected has an action towards a body, it becomes infected. If a doctor does it, either citizen or doctor. Leaning towards citizen.
>>
>>43507531
If doctors can't convert others and you make people able to become doctors spontaneously, it would spread out the doctors rather than keep them centralized.

As for the corpses,
>>43507494
>>43507585
>>
>>43507589
>If a doctor does it, either citizen or doctor
So the doctors are able to not only bring people back to life, but also bring them back to life with sudden knowledge of medical practise
>>
>>43507608
Citi's don't become doctors spontaneously. Doctors have a chance convert the infected to doctors, and now citi's are able to be trained if a doctor has an action towards a citizen.

>>43507622
I sort of stressed the joke in that in the opening post.
>>
OR. Since there's turning out to be a lot of ways to be a doctor, maybe the doctor can dun gooft and revive a corpse which revives as an infected?
>>
>>43507633
What I'm saying is that having doctors spread out would be better than having them all end up in a centralized location. If doctors couldn't convert others into doctors but rather people spontaneously became doctors, you would get better results, because the doctors would spread out and have greater chances of healing more infected people. Once healed, an infected person would be immune to becoming re-infected, because now they have antibodies for that disease (like what a vaccine does).
>>
>>43507723
I'm gonna leave conversions in, but I can make like a 1% chance that a citizen will become a doctor. Open to suggestions on the percentage.
>>
File: Untitled.png (34 KB, 803x827) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
34 KB, 803x827
>>43507723
>>43507775
This is what happens when citz have a 1% chance to randomly become a doctor..
>>
They're basically all being converted into doctors now. Need to buff the infected. Ideas?
>>
>>43508055
Random chance of citizen becoming shit tier doctor causing more infections/deaths?
>>
>>43507862
Instead of everyone dying from the world descends into chaos due to everyone becoming doctors

As I see it, the infection cannot be 'contained' without surrounding it by enough doctors, but doctors need to be surrounded by corpses/empty space to prevent everyone from becoming doctor?
>>
>>43507862
may want to code in a different ending, like if doctors has a larger number than infected, "It only took ___ days for the disease to be dispatched."
>>
>>43508142
Already have.
It only took 60 days for the infection to be eliminated
Doctors: 4957 - Infected: 0 - Citizens: 29 - Dead: 14 - Day: 60
>>
>>43508055
.1% chance of catching the disease airborne.
chance of disase mutating, meaning current doctors are useless.
you have options.
>>
>>43507862
I wouldn't mind living in this universe
>>
>>43507862
Don't turn them into doctors permanently but only for x turns instead, like volunteers helping the doctors.
>>
>>43508306
and volunteers have increased chance of fuckuppery.
>>
>>43507862
What about 10% chance for two citizens to exchange places?
>>
>>43508259
You would when you realize everyone is a doctor without defibrillators, MRI scanners, sanitary IV needles or even a decent scalpel.
>>
>>43508334
Can only become and X and only remain an X if adjacent to infected.
>>
File: Untitled.png (67 KB, 805x861) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
67 KB, 805x861
Ending simulation based on citizens is removed.
Virus can now be "contained" with bodies. aka no moves left.
So endings are now: defeat, containment, elimination.
>>
>>43508417
will the virus ever burn out? people heal on their own or die, no live vectors for transmission?
Or is it like AIDS, always there?
>>
>>43508446
herpaids.
>>
Something needs to be done about the bodies, and open space isn't a great option since no one moves.
>>
>>43508417
>>43508525

Infected should die by themselves after x moves. That way the dead would be contained within the infected, so that the front of infected will either meet doctors or advance and grow
>>
Add a soldier class which have a 25% chance of killing one single infected in a 5x5 area around him
Have a chance that citizens can turn into soldiers
XXXXX
XXXXX
XXSXX
XXXXX
XXXXX
>>
>>43508680
A buddy of mine suggested this a couple days ago too. Even the 5x5 part. I like it. I'll add it now.
>>
When you say "towards a doctor" does that mean they are moving into a coordinate inhabited by a doctor, or just in their direction even across the board? (action at a distance)

Does the infection make the citizens murderous? Eg why is there a 25% chance that a doctor who encounters an infected will not become infected but simply drop dead?
>>
>>43508871
Say the current run is [34][62] and that coordinate is the infected. They pick a random direction to perform an action towards. Left right up or down.
The doctor dying is just an event to give it some variety. Let's say he's completely eaten so there's nothing to turn into the infected to efficiently eat/convert people.
>>
>>43508871
>why is there a 25% chance that a doctor who encounters an infected will not become infected but simply drop dead?
Suicide as he realizes he's infected
>>
Thanks OP for a nice and original thread
>>
Place all the doctors in a lump at the bottom-middle of the board's border.
>>
>>43507531
>90% of the population has a phd.
>the world is in chaos.
>>
>>43509052
>90% of the population has a M.D.
>No patients to cure
>The world is in chaos
ftfy
>>
>>43508939
Why is there such a strong likelihood the doctor is a little bitch?
>>
OP, how did you start writing this? Are there any guides or tips for how to start writing little automats like that?

Also kinda curious about a source code.
>>
>>43509100
They didn't have skill sets before they became doctors?
>>
>>43509117
No, it's an American apocalypse.
>>
I don't think you guys get it.
These doctors are -the best-.
Also, almost done with soldier, it's turning out nicely.
>>43509115
I was just bored. It's just array iteration and conditional substitution.
>>
>>43509117
The economy has already been dependent on patients.
People started to trade giving medical care as a replacement for currency.
The sudden rise in infected caused everyone to be doctors
When the infected ran out, nobody had any money to do anything, all economy collapsed to trade
And all they had to trade was medical supplies
>>
File: Untitled.png (59 KB, 806x833) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
59 KB, 806x833
>>43509250
And dilaudid. Don't forget dilaudid.

The soldier had some cool outcomes. This is only starting with 1 soldier on the board in a random location.
>>
>>43509279
>Don't forget dilaudid.
Well, everyone would be using their own stock for getting high to ignore their PTSD
>>
>>43509279
Maybe tone down the probabilities of someone becoming a doctor while making each doctor more likely to cure people, but less likely to turn others into doctors.
>>
>>43509361
Cure as in turn back to citizen?
>>
>>43509551
yes.
>>
>>43509551
Not him but yea... I recently was treated for a cold. I didn't become a doctor...
>>
>>43509551
Or turn into IMMUNE
>>
>>43509279
You should make the infected eventually die after a number of turns.
Example: After a citizen has been infected for 10 rounds, they die.
Then your system could be based around dead citizens, and not infected ones.
>>
Okay here's what we have so far.
On the infected's turn:
>25% chance to infect a citizen if their action is towards one
If towards a doctor:
>25% chance to die
>25% chance to turn into doctor
>25% chance to turn doctor into infected
>25% chance to kill doctor

If it's a doctor performing an action:
>5% chance to turn the infected or civilian into a doctor if the action is towards one

Civilian's turn:
>1% chance for civilian to turn into a doctor
>1% chance for civilian to turn into infected (airborne)

Soldiers turn:
>25% chance to kill an infected
>25% chance to train civilian as soldier
Soldiers pick is a random pick in a 5x5 radius.
>>
>>43509700
>Invincible soldiers
Surely you should add a way for them to die.

This idea is also quite nifty:
>>43509593
>>
>>43509700
>25% chance to turn into doctor
This seems waaaaay too high. If every time I went to the doctor I had a 25% chance of becoming one I would make a lot more money than I currently do.
>>
File: Untitled.png (63 KB, 804x833) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
63 KB, 804x833
>>43509751
No if their action is towards an infected they have a 50% chance of negative outcome. (death or infection).

>>43509748
True. I'll make them able to be infected.

Soldiers can now "accidentally" kill doctors. The outcome is pretty funny, too. I'd make an American joke but I'm Canadian and that'd be rude, sorry for thinking about it.
>>
>>43509827
>and that'd be rude, sorry
confirmed canadian
>>
>>43509861
>>43509827
why are canadians the best? how do they wield such power?
>>
>>43509884
with great power comes great winter temperatures.

Alright. When infected make an action towards a doctor, there's now a 25% chance the doctor dies, 25% chance the infected dies, 5% chance he turns into a doctor, 25% chance he becomes infected. 20% chance nothing happens. Not a fan of nothing happening, let's adjust percentages or make something else happen?
>>
>>43509936
No I fucked that up.
doctor dies(25%), infected dies(25%), infected becomes doctor(5%), doctor becomes infected(25%) nothing (20%)
>>
File: Untitled.png (57 KB, 804x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
57 KB, 804x831
With that said... We need to focus on bodies now. Open spaces isn't really viable since no one moves. It'd be the same as having a dead body.
>>
>>43509936
%5 infected becomes ordinary
%5 infected becomes soldier
%10 both doctor and infected die
>>
>>43509962
Crank doctor dying up to a 35%, same with infected dying.

Also can you post webms of the program in action if it displays each step?
>>
>>43509936
Spontaneous Combustion?
>>
>>43510021
I think it would be very slow. I need to add a sleep() otherwise it flickers like crazy. It displays the map by iterating through the multidimensional array and printing each element. Not to mention Term::ANSIColor slowing at all down with its autoreset.

>>43509999
Deal.
>>
>>43509998
>Open spaces isn't really viable
You could have ordinary people repopulating the area near them?
>>
>>43509999
Sweet quads. Your suggestion is also better than mine.
>>
>>43509998
Three open spaces near two non-infected results in a new C?
Also, >>43509748 said my Idea was nifty. :3
>>
File: Untitled.png (57 KB, 804x832) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
57 KB, 804x832
>>43509999
Added. picture is result. It's much more spread out, but a lot of deaths. Fuckin' soldiers. Nice quads too.

I'm debating the 'alive for 10 runs'.
>>
>>43510074
What if female and male classes are shown with colors. if a female and male are next to each other they have an 1% chance to make a new C.
>>
>>43510139
Massacre Simulator 2014
>>
>>43510140
I have a very limited color pallet.
>>
>>43510173
BTW, what is your illness?
>>
>>43510173
Actually it's possible.
Do you suggest when the board is initially populated with citizens that there is a 50% chance of male/female, and let's say a doctor can clear a corpse, there's a male and female side-by-side they populate an open location? I worded that like a moron but I'm tired and sick.

>>43510255
Canadian.
>>
>>43510268
I think either everyone except the infected (maybe even the infected, if you consider them eating corpses) should be able to clear bodies or they should go away after a few turns à la decomposition
>>
So the spot just becomes empty? It'd basically be the same as having a body there, nothing can act on it.
>>
How are you iterating through units? Are you going from top most left corner? If so that's kinda unfair because the units <^ have higher influence than these >V, or at least that's what I think, I could be wrong though.
>>
>>43510411
[0][0] -> [0][99]
[1][0] -> [1][99]
...
>>
File: Untitled.png (59 KB, 805x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
59 KB, 805x831
If soldiers can clear bodies
>pic
>>
File: Untitled.png (53 KB, 803x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
53 KB, 803x831
Oops hyphen placeholder.
Soldiers clear a random body in their 5x5 radius.
>>
>>43510659
Too many soldiers.
>>
>>43510722
It's America
Everyone has guns
>>
>>43510740
Oh
>>
>>43510659

It just feels wrong that that counts as the infection being contained.
>>
>>43510659
>starting to look and feel a little bit like dwarf fortress
please continue
also post source code before you leave OP
>>
>>43510659
You should put these screencaps on canvases, and call it art.
Sell it for lots a money.
>>
>>43510659

You should add in the ability for them to randomly move one space in any direction.
>>
File: Untitled.png (60 KB, 802x831) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
60 KB, 802x831
>>43510748
I agree, especially if it's airborne. But if nothing happens for 20,000 iterations it's considered no moves available.
>>43510771
If I've learned anything, it's stupid shit sells. Like that ebay auction of a 4chan post.

>>43510722
Reduced to 5% chance of a soldier converting a citizen into a soldier.
>>
File: Untitled.png (45 KB, 806x839) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
45 KB, 806x839
Oh wow that's weird.
I increased timeout to 200,000 and got... This.
>>
>>43510817
That looks so much better.
And yeah, stupid shit sells so well in the art world.
You can LITERALLY splatter random shit on a canvas and people will buy it.
>>
>>43510859
does it only print the end result?
>>
>>43510859
>1764 days
>almost 5 years
this is getting more and more realistic
>>
>>43510817

You should really do something with these empty spaces. Not sure what, though.
>>
>>43510859
Looks like something you'd see on the screen of a movie hacker.
>>
>>43510888
I have the part where it prints every x-iteration commented out, so right now for delivery purposes, yes. I could make a webm of it actually working but it'd be a long process, since I have to sleep() after each print so it doesn't flicker like crazy. It'd take a very long time I think.
>>
>>43510913
Atleast this does something
>>
File: problem.png (48 KB, 802x831) Image search: [iqdb] [SauceNao] [Google]
problem.png
48 KB, 802x831
>>43510817
I think this problem was somehow solved in
>>43510859
>>
>>43510938
Think about it.
What does it do?
>>
>>43510913
>We have to hack Ebola!
>>
>>43510972
Entertain /g/
>>
>>43510972
Provides 5 hours of entertainment apparently.


also figured out how to reduce flicker. How2make webm easily?
>>
>>43510972
plays gaem
>>
>>43510916
double buffering could fix that if it's available.
>>
>>43511034
I believe it's because of the color module. It's especially slow if auto-reset is on. I turned it off and I made it only print the map every 10000 steps and it looks pretty good. I'm also ssh'd into this box, and it's in screen. Dunno if screen has anything to do with it.
>>
>>43511005
this is just some random googling but:
you could try exporting each frame to png and using
http://wiki.webmproject.org/howtos/convert-png-frames-to-webm-video
>>
>>43511065
or use ffmpeg
ffmpeg.exe -r 1 -i %03d.png -an -r 30 out.webm
-r 1 1 sec png
-i %03d.png input 3 digit .png 001.png 002.png..
-an no audio
-r 30 30 fps webm (no matter)
out.webm output filename
>>
>>43511143
>>43511065
heh whups.
I just used a screen recorder then an online converter to change avi to webm. Will post if it works.
>>
>>43511158
Still waiting. Does it work?
>>
>>43511315
Yeah but it said audio streams not allowed. Gotta figure out how to make it not record audio.
>>
>>43511342
Just do this with ffmpeg
ffmpeg -i input.webm -an -c:v copy output.webm

Takes no time.
>>
>>43511342
ffmpeg.exe -i in.webm -an -c:v copy out.webm
>>
tryin'
>>
>>43511365
>>43511398
hivemind

OP, could you put the current source code up on pastebin? Maybe update every so often after significant changes?
>>
Ebola's game of life?
>>
>>43511424
Hell, he should put it on github or whatever

>>43511423
You should seriously consider my earlier proposition
>>
>>43511449
What was your earlier proposition? Sorry.
>>
>>43511423
>dat vsync need
>>
>>43511469
export every turn frame to a png, then make a webm out of those
>>43511065
>>43511143
>>
>>43511485
It's because it's trying to display 5000 characters every so many iterations. It prints the grid letter by letter, each letter accessing the Term::ANSIColor module, which itself is a slow piece of shit.

>>43511504
How would I export an array-print to a png?
>>
>>43511521
Could you make a monochromatic version, with just letters?
>>
>>43511521
i wonder if I could call scrot from inside the script. I'll try
>>43511533
I'll do this, too.
>>
Much smoother.
What the fuck, max time is 120 seconds? Things that would have been good to know 150 seconds ago.
>>
>>43511655
double the frame rate?
>>
>>43511678
this
>>
>>
So the doctors can "Move" give them a chance to "pass on" their skills, like a 75/25 chance that that happens, they move across the board or shit.
>>
>>43511521
Can you modify the characters onscreen individually? This would reduce the number of times it is accessed ie: when a value is changed, the screen updates that single character immediately instead of waiting til the end to update all.
>>
>>43511788
This would cause significant flicker. It would still have to print the array to screen. Since it's a two-dimensional array, can't just "print @array"; I need to iterate through it. So, print [0][0] to [0][99] then linebreak.
I have it printing the array every 5 iterations through it entirely (which is why it isn't "real time") which cuts down on the flicker.
>>
File: Untitled.png (46 KB, 804x836) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
46 KB, 804x836
Handicapped sign or just me?
>>
Here's what it looks like, with no sleep and colors.
Actually not horrible once it spreads out.
>>
File: 53646332542.jpg (61 KB, 500x545) Image search: [iqdb] [SauceNao] [Google]
53646332542.jpg
61 KB, 500x545
Can soldiers get infected?
Also, nice job with the program, thread is pretty fun, what font are you using? I love the way the end result looks like.
>>
File: Untitled.png (61 KB, 804x833) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
61 KB, 804x833
>>43512020
This is what happens if they can.
>>
>>43512020
Oh sorry. Think it's just monospace.
>>
>>43511725
So doctors can move to empty locations?
>>
I'm to have all units move to a random empty space (if in range and possible). See what happens.
>>
Why call them doctors, call them mutants or something, then it would make sense for everybody to become resistant to the plague.

>but how does the mutation spread
I don't know.
>>
I love simulations, they are the most fun thing to do as a beginning programmer.

I remember I had to do a class project where we simulated a call center, every tick there was a chance that a new incoming call could enter the queue, and once a call was processed, the longer it went on the more of a chance there was for it to end and the person could move to the next call. You had to leverage the data to make recommendations to the call center about how many people to hire and stuff.

Now I want to dig it up and add conditions for the callers and employees succombing to a fucking plague.
>>
File: Untitled.png (29 KB, 804x835) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
29 KB, 804x835
>>43512313
You definitely should.

>>43512255
No one becomes resistant. Immunity was discussed but I dunno, on the edge about it.

This is what happens when everyone can move. It's trippy as fuck to watch, too.
>>
LOL oops. Bodies can move too apparently. I'll fix that. Here's what it looks like though.
>>
>>43512357
>No one becomes resistant. Immunity was discussed but I dunno, on the edge about it.
Doctors are kind of resistant though, in a sense, since they can block the outbreak.

It's just odd to have so many 'doctors' it's an unfitting name, imho.
>>
What if there was a second type of infection on the map with the same rules except if it comes into contact with infection A it kills one of Infection A and B at random and creates Infection C in the place of other infected?

Infection C doesn't spread and can't be cured or killed.
>>
>>43512441
Soldiers have a range of 5x5. They pick a random spot within that range. If it's a doctor or an infected, it dies. If it's a body, the body is cleaned up.

>>43512460
It isn't realistic a person can be trained into an efficient doctor in such a short period of time, but it needs balance, right? Doctors aren't resistant, they're the most likely to die, too. They have a chance (25%) to die when an infected's action is performed against them, they also have a chance (25%) to be infected. When their action is performed against an infected, they have a 5% chance of converting them to a doctor (same if it's a civilian, so 15% total chance of converting to a doctor, and 50% chance of dying or becoming infected.
>>
source please OP
>>
>>43512550
will post when I'm happy with it. very messing right now since I'm commenting in/out blocks of code.
>>
File: 1402380023022.gif (227 KB, 466x322) Image search: [iqdb] [SauceNao] [Google]
1402380023022.gif
227 KB, 466x322
>>43512605
Messy*
>>
what if doctors trained others into nurses instead of doctors, and nurses have less chances of curing
>>
>>43512605
Use http://piratepad.net/

That way we can see changes as you make them!! =D
>>
>>43512695
I can do that.
>>
>>43512695
Wow, that's pretty offensive.

How about go fuck yourself.
>>
>>43512739
would you trust a nurse after being trained in one day?
>>
>>43512739
>spambot algorithm picks up a completely unrelated post
>>
>>43512739
LOL ASSBLASTED
>>
>>43507028
that's a lot of fucking doctors. why not have the original doctors separately classed from their trainees? It's not very realistic that someone goes from being sick to being a fucking genius doctor.
>>
>>43507531
trapped doctors are OK. Someone has to be a coroner
>>
you could go whitewalker on this bitch and if bodies aren't burned by a soldier (or others) within a few days then they will become infected or gain some other infection
>>
>>43512786
This is what is happening. There will ONLY be 10 starting doctors. The rest are converted into nurses. Although, there's still a 1% chance a citizen will get his shit together and become a doctor.
It's the soldiers we need to work on. They're the ones winning this thing.
>>
>>43512875
soldiers kill doctors? why? that's retarded. Also, do you have people swapping places to simulate movement? Like a 30 percent chance to swap with one of its neighbors
>>
>>43512875
if a soldiers infected he becomes a more powerful infected person
>>
Add infected dragons that shoot infected people.
>>
>>43512947
Friendly fire amidst the chaos.
>>
>>43512947
Soldiers might kill someone on accident.

>>43512875
I love the nurse idea, but I think after a certain number of positive interactions with a doctor, a nurse should be able to become a doctor. Maybe after a certain number of successful treatments?
>>
>>43513024
>kill someone on accident
why are they killing people to begin with? i just don't understand how soldiers factor in here. it's not a warzone right? it's a population suffering from a plague. If it's a warzone, why are they fighting their own citizens?
>>
The problem that im seeing is, either the citizen dies or becomes a doctor, why is there no inbetween?
>>
>>43513060
this. what were you thinking???
>>
>>43513054
If an outbreak reaches a critical level, martial law will be declared in any sane country. It's an effort to use force to stop the infection from spreading any further while a cure is being developed.
>>
>>43513054

Think "National Guard" when it says Soldier.
>>
File: 1405813829269.png (277 KB, 400x531) Image search: [iqdb] [SauceNao] [Google]
1405813829269.png
277 KB, 400x531
>OP open sources the code
>game becomes the dorf fort of zombie games
holy
fuck
yes
>>
>>43513060
Doctors and nurses can change infected back into citizens.
>>
>>43513081
>>43513060
A citizen's function should be being helpless in the face of infection.
>>
>>43513060
that's a good point and explains why there were so many doctors. only two outcomes are possible: everyone dies, or every survivor is a doctor. which is dumb as fuck.

>>43513085
I guess so, but they don't do things that necessarily help... killing doctors... killing infected... how about having them be people who "quarantine" the infected, and surround them or something
>>
>>43513091
>>43513085
have soldiers come in after a certain amount of infected or after a certain amount of days
>>
>>43513127
>killing doctors... killing infected... how about having them be people who "quarantine" the infected, and surround them or something
Well I think a quarantine function would be good, but if an infected poses a risk it might be NECESSARY to kill them which I think is what you can rationalize from the simulation. As for killing doctors, it is definitely not INTENTIONAL from the soldier's point of view. It was a mistake.

>"Oh my God that infected is running towards me, I have to kill it before it kills me!"
>"There's a doctor and an infected over there let me try to save the doctor!"

>>43513151
That's a cool idea.
>>
OP what is the current status of the official rule set right now?
>>
Increase the numbers, input like 5 million or is it too much?
>>
>>43513215

Town starts with one soldier, ten doctors and three infected.
Everything except blank spaces and bodies get to take an action, and that action is in a random direction (N, W, S, E).

After all units have taken an action, the move function is called, where the unit again picks a random direction. If the direction which they picked is open, they move to it.

Infected action (75% chance to do nothing):
If action is towards a citizen:
>Citizen is infected
If action is towards a doctor/nurse:
>25% chance doctor/nurse dies
>25% chance infected dies
>5% chance infected converted to nurse
>25% chance doctor/nurse converted to infected
>5% chance infected is healed to citizen
>5% chance infected healed to soldier
>10% chance they both die.

Doctor/nurse action (95% chance to do nothing):
>5% chance to convert civilian or infected to nurse

Citizen action (98% chance to do nothing):
>1% chance to become doctor
>1% chance to become infected

Soldier action:
Picks a random spot in a 5x5 radius from itself.
It has a 25% to perform its action, its action depending on what is picked.
If it picks a doctor or a nuse:
>the doctor/nurse is killed :(
If it picks an infected:
>infected dies
If it picks a body:
>body is cleaned up (empty space)
>>
>>43513380
you should take out the 1% chance for citizens to be infected
>>
>>43513380

What can a doctor do that a nurse can't?

Also, shouldn't soldiers have a lower chance of killing doctors compared to infected?
>>
>>43513435
Airborne and whatnot.

>>43513436
Now? Nothing. In like 10 minutes though, higher success rate.
Yes, I'll also add the less chance to off a doctor/nurse, too.
>>
>>43513106
if only dorf fort was open source. :( it legitimately sucks that it isn't, because it would only take about a month before the interface was streamlined by third parties, and the code refactored to not freeze up on load times and shit.
>>
>>43513180
okay, i guess i didn't realize that the infected were like zombies or something that went batshit insane. carry on.
>>
>>43513380
>Doctor/nurse action (95% chance to do nothing):
>5% chance to convert civilian or infected to nurse

Wouldn't it be better to add the chance for the doctor to cure an infected next to him? It seems pretty strange to have them take such a passive stance-
>>
>>43513570
that's what happens. unless I'm misunderstanding you.

Doctors now have 7% chance to convert, where nurses have 3% chance to convert.
>>
File: Untitled.png (30 KB, 804x850) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
30 KB, 804x850
Current setup isn't horrible, actually; they manage to completely eliminate the virus. Soldier friendly-fire has been reduced to 2%
>>
I'm thinking just so doctors can seem like the more proficient unit over nurses, and just to give some use to dead bodies instead of soldiers just scooping them away, maybe bodies can be revived by doctors but only into civilians?
>>
>>43513722
Maybe with a very low success rate, something like 1%.
>>
>>43513631
I mean a chance to convert them to citizen durign their turn. From what you wrote earlier, it seems that the only thing they can do in their turn is to teach another individual to become a nurse.
>>
>>43513779
They do train nurses. If their action is towards the infected, or a civilian, they become nurses.
>>
>>43513380
Make it so that Soldiers can only friendly fire if an infected is in his 5 X 5 area.
>>
>>43513722
Bodies should carry infection, if not cleared they could become a danger.
>>
What about structures?

You could have # denote a space that cannot be crossed. Maybe have the civilians build walls instead of just dying? Maybe have a Builder class?
>>
>>43513905
How about if a civilians action is towards a body it becomes infected?
>>
>>43513929
Nice.
>>
>>43513841
>>43513905
>>43513920
>>43513929

See OP this is why you need to just post source, otherwise we're just going to yell at you about what you should do to your program
>>
>>43513963
See >>43505737
>Once that gets boring, I'll be open to suggestions, variable tweaks and so-on.
>>
>>43513920
I love the idea. I don't know how it'd turn out though since they move each turn. So he'd build on an empty spot then move. He may eventually build a circle around himself though.
It'd be more self-preservation as a civilian rather than a species. I like it.
>>43513963
That's the entire reason I posted it, it's not my program it's ours. I just write it in.
>>
>>43513988
>>43513974
stop telling me im wrong. that's NOT why i post on /g/
>>
>>43513988
You could make it so a builder can only place so many structures within a certain amount of turns, maybe have a cooldown period or something.
>>
>>43514002
Any type of ammunition, cooldowns, etc would require an entire new two-dimensional array with iteration, but it's doable. Another possibility could be the town has a limited supply of wood.

>>43513996
I'm not telling you you're wrong, or how to post. I'm explaining the purpose of my thread.
>>
>>43514038
Oh man having a wood supply is really interesting when you think about it. It implies that some people are using shared resources for self preservation rather than the common good.

It must be some intense existential torture to be sitting in a 1x1 shack while all your infected townsfolk are dying just outside your walls.
>>
>>43514071
mite b cool
>>
Needs vaccinations
>>
>>43514094
Maybe if a certain amount of doctors and nurses exist that certain day, it ++ progress towards vaccine. If doctors/nurses die out, so do people.
If vaccine is created, any nurse/doctor who comes across an infected can cure them back to civilian.
>>
>>43514120
Vaccines don't cure diseases they do you from getting them.
>>
Can you make it so when a citizen dies it deletes a random file off your computer?

Thanks and post results, if you can...
>>
File: Untitled.png (36 KB, 805x849) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
36 KB, 805x849
Not the most effective builders.
>>
>>43514584
Perhaps implement a builder that builds shit?
>>
>>43513799
Of course they do. I was saying that they should also have a posibility of converting infected to citizens during their turns.
>>
>>43514667
Oh I see. I can do that.
>>
>>43514667
Added, working on builders now, then putting in soldiers only shooting if an infected is in their radius.
>>
>>43514584
Allow only the player to build.
Once every ten runs.
>>
>>43514584
You really need to make a git repo. Source and current set of rules you're building towards.
>>
>>43514159
I doubt he would do something that masochistic, but if he makes it open source you can do it yourself.
>>
Yeah man, make a git repo, this is a game coming out of random shit.
>>
I'll do the repo tomorrow.
Will be under the github account Ziddykins.
Soldiers wont shoot their weapons if a civilian is is in a 2x3 radius.
Also soldier radius is 2x3. 5x5 is actually pretty huge.
Doctors can now change infected into civilians 10%, and I think it was 1% chance to raise dead into civilian.
>>
>>43512739
way to go nsa
>>
what about competing diseases?

or I guess cured counts as a disease in that sense
>>
>>43515673
Read the thread or fuck off.
>>
>>43515673
see
>>43515423
>>
Page ten savety bump!
>>
bump for Ebola simulator 2014
>>
>>43513686
>completely eliminate
>1 infected left
>>
>>43518416
i assume it's something like that
while(whatever){
print_map();
step();
}
print_result();

so the last infected to get shot wouldn't be printed as dead on the map, just in the results.
>>
>>43518536
or
while(infected_count>0 OR health_population>0) {
step();
print_board();
}
>>
>>43518706
*healthy_population
>>
>>43518706
ment to put AND instead of OR
>>
One of the best threads in /g/ for awhile. Thanks OP.
>>
File: spongewait.jpg (9 KB, 267x189) Image search: [iqdb] [SauceNao] [Google]
spongewait.jpg
9 KB, 267x189
>>43518909
now all there is to do is to wait for OP to deliver the sauce
>>
A friendly reminder to readers requesting source:
https://www.gnu.org/philosophy/open-source-misses-the-point.html
>>
>>43509998
>>43508581

this will solve the problem of dead bodies blocking anything
>>
>>43509700
>Turn an infected into a doctor
Dr. Zombi curing the uninfected with infection. haha
>>
It would be cool to have different end state messages based on the final populations.

>Mostly Soldiers
>"It only took X days for the infection to be eliminated"
>"Martial Law was declared"

Or something like that, gives it a little more personality.
>>
>>43514667
>>43514758
Before becoming a doctor or nurse, shouldn't an infected become a citizen first? In the current context it's like a doctor is treating someone while simultaneously teaching them the medical profession. If anything, recovery should be the first priority (infected to citizen) and if possible, training (citizen to nurse/doctor).
Thread replies: 279
Thread images: 34
Thread DB ID: 8892



[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at wtabusse@gmail.com with the post's information.