VIP Algorithm

29 views
Skip to first unread message

John Pirie

unread,
Aug 16, 2011, 8:10:25 PM8/16/11
to CorsixTH Development
Hi all,

I've prepared a document which describes the algorithm that is going to
be used to determine the rating that a VIP will give for a hospital as
otherwise these things can be quite mysterious. The document can be
found at the link below.

http://www.jpirie.com/vip-algorithm.pdf

All comments are very welcome, let me know any thoughts that you might
have on this. I dare say some things will be tweaked and we certainly
can play around with some of the numbers.

Cheers,

John

signature.asc

Benjamin Gudehus

unread,
Aug 16, 2011, 7:41:56 PM8/16/11
to corsix...@googlegroups.com
Hey, this looks very interresting!

2011/8/17 John Pirie <jpir...@gmail.com>

Edvin Linge

unread,
Aug 17, 2011, 6:02:34 AM8/17/11
to corsix...@googlegroups.com
Very interesting indeed! Open-mouthed smile Keep up the good work!
 
/Edvin
wlEmoticon-openmouthedsmile[1].png

Steve

unread,
Aug 17, 2011, 6:58:50 AM8/17/11
to CorsixTH Development
That's pretty awesome, well done!

I have three queries:
- The VIP may not wish to visit all rooms in the hospital and I
believe he does not in the original game. Maybe a 50% chance he will
visit each room?
- I gather from the document that any vomit anywhere in the hospital
will affect the VIPs opinion. Perhaps to be more realistic we should
only count the vomit that the VIP sees? Any that is within an 8 tile
radius or similar?
- You didn't mention how the VIP decides on his route around the
hospital. Is it to the nearest room that he has on his list, that he
hasn't already visited?

Steve
>  signature.asc
> < 1KViewDownload

Alvaro Muro

unread,
Aug 17, 2011, 7:15:46 AM8/17/11
to corsix...@googlegroups.com
Hi!

First thing:
Very good document, well done!

Second thing, sorry for my English.

Then my ideas:
- I think that plants:room ratio is not realistic. I mean, if I have 20 rooms, then I put 20 plants in the same corner of the hospital will be the same that if I put a plant on each room? 
I think that would be more ralistic that if each room have plants (and the plants looks healthy!) good puntuation.
Maybe is better evaluate each single room (plants + machine status + trash + fire extinguishers + windows...). Then you got a puntuation for each room and you can calculate de average.
- There is no evaluation for windows -> windows are not important?
- WC: apart from queues, one Wc on each building/floor would be a good puntuation beacause it's easy to go to bathroom.
- Vomit -> tiles radius seems a good idea Steve.

Thanks

2011/8/17 Steve <stephen....@gmail.com>



--
Salud!

John Pirie

unread,
Aug 17, 2011, 8:38:22 AM8/17/11
to corsix...@googlegroups.com
On 08/17/2011 11:58 AM, Steve wrote:
> That's pretty awesome, well done!

Thanks. :-)

> I have three queries:
> - The VIP may not wish to visit all rooms in the hospital and I
> believe he does not in the original game. Maybe a 50% chance he will
> visit each room?

That seems reasonable to me, I'll add that in.

> - I gather from the document that any vomit anywhere in the hospital
> will affect the VIPs opinion. Perhaps to be more realistic we should
> only count the vomit that the VIP sees? Any that is within an 8 tile
> radius or similar?

I like this, I'll add that in too. I'll set it to an 8-tile radius for
now, if we want to change it later then it'll be easy to do so.

> - You didn't mention how the VIP decides on his route around the
> hospital. Is it to the nearest room that he has on his list, that he
> hasn't already visited?

Good question.

At the moment there is no planning on the route at all. In the
implementation there is a list held of all the rooms that are in the
hospital, and the VIP will seek each room as it appears in the list.
This means that in theory, the VIP could visit rooms all over the
hospital in the worst possible order.

Something should be done about this, but at the moment it's a low
priority task as it could be a bit time consuming and it's often not
noticable. Once I get the main bits of the algorithm implemented I'll
see about create some smarter room finding.

I've updated the document (jpirie.com/vip-algorithm.pdf) to include
these notes.

Thanks for the comments! :-)

John

> Steve

signature.asc

John Pirie

unread,
Aug 17, 2011, 9:34:19 AM8/17/11
to corsix...@googlegroups.com
On 08/17/2011 12:15 PM, Alvaro Muro wrote:
> Hi!
>
> First thing:
> Very good document, well done!

Thanks. :o)

> Second thing, sorry for my English.
> Then my ideas:

> - I think that plants:room ratio is not realistic. I mean, if I have 20
> rooms, then I put 20 plants in the same corner of the hospital will be
> the same that if I put a plant on each room?
> I think that would be more ralistic that if each room have plants (and
> the plants looks healthy!) good puntuation.
> Maybe is better evaluate each single room (plants + machine status +
> trash + fire extinguishers + windows...). Then you got a puntuation for
> each room and you can calculate de average.
> - There is no evaluation for windows -> windows are not important?

This is a good idea. I'll change it so that we look at each room
individually, looking at the criteria of plants, windows, machine
status, fire extinguishers, windows, and the skill of the doctor in the
room. This will be much better, thanks!

> - WC: apart from queues, one Wc on each building/floor would be a good
> puntuation beacause it's easy to go to bathroom.

I'll add that in too.

> - Vomit -> tiles radius seems a good idea Steve.

Agreed.

Thanks for the comments! I've updated the document
(jpirie.com/vip-algorithm.pdf).

> Thanks
>
> 2011/8/17 Steve <stephen....@gmail.com
> <mailto:stephen....@gmail.com>>


>
> That's pretty awesome, well done!
>
> I have three queries:
> - The VIP may not wish to visit all rooms in the hospital and I
> believe he does not in the original game. Maybe a 50% chance he will
> visit each room?
> - I gather from the document that any vomit anywhere in the hospital
> will affect the VIPs opinion. Perhaps to be more realistic we should
> only count the vomit that the VIP sees? Any that is within an 8 tile
> radius or similar?
> - You didn't mention how the VIP decides on his route around the
> hospital. Is it to the nearest room that he has on his list, that he
> hasn't already visited?
>
> Steve
>
>
> On Aug 17, 1:10 am, John Pirie <jpiri...@gmail.com

signature.asc

Edvin Linge

unread,
Aug 17, 2011, 9:01:10 AM8/17/11
to corsix...@googlegroups.com
I don't remember if it got into the game, but notice that such a "room
rating" is also good to use to decide if the doctor gets happier or not.

/Edvin

Steve

unread,
Aug 18, 2011, 8:30:03 AM8/18/11
to CorsixTH Development
> At the moment there is no planning on the route at all. In the
> implementation there is a list held of all the rooms that are in the
> hospital, and the VIP will seek each room as it appears in the list.
> This means that in theory, the VIP could visit rooms all over the
> hospital in the worst possible order.
>
> Something should be done about this, but at the moment it's a low
> priority task as it could be a bit time consuming and it's often not
> noticable. Once I get the main bits of the algorithm implemented I'll
> see about create some smarter room finding.

That's funny, as when I started doing VIPs that's the very first thing
I did. There is a function for working out distances, so it's not too
bad to look through the list of rooms you still need to visit and
choose the one that is closest.

> Edvin: I don't remember if it got into the game, but notice that such a "room
> rating" is also good to use to decide if the doctor gets happier or not.

I don't remember if there was one, I made one, or I just dreamed of
one, but yes, it makes sense that the same rating can affect doctor
happiness, patient happiness and VIP happiness.

The happiness of patients around VIPs may also be a useful bias.

Steve

Haico van Roeden

unread,
Aug 18, 2011, 11:08:45 AM8/18/11
to corsix...@googlegroups.com
We could possibly also reuse the rating code to generate the end of the year awards and such, using different parameters ofcourse.

--
Best regards,

Haico van Roeden
haicova...@gmail.com
Reply all
Reply to author
Forward
0 new messages