4 ms·
You got one inbuilt. It's logic goes something like if myself.is_near(train_tracks) and (myself.can_see(train) or myself.can_hear(train)): myself.r
by JupiterMoon 11y ago
You got one inbuilt. It's logic goes something like
if myself.is_near(train_tracks) and (myself.can_see(train) or myself.can_hear(train)):
myself.risk_of_oncoming_train = True
- Lawtonfogle 11y agorisk_of_oncoming_train is a boolean? Sounds more like something that would be representing a chance, so I would be expecting something like a floating point number.
- JupiterMoon 11y agoI was thinking that being hit by a train is a situation that I want a 0 probability of. So personally if the probability is non-zero I would immediately act to reduce it to zero. Hence a boolean does the job for me.
- ZeroGravitas 11y agoApparently this doesn't work as well as you'd think. I just read a depressing article about the number of people that pose for photos on train tracks, when celebrating big life changes like marriage or graduation, and then get hit by trains. https://www.washingtonpost.com/local/public-safety/taking-photos-on-train-tracks-a-mistake-you-cant-undo/2015/10/02/99769f94-6218-11e5-9757-e49273f05f65_story.html https://www.washingtonpost.com/local/public-safety/taking-ph...