Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000479Core InformPhrases and functional programmingpublic2010-12-20 10:442014-05-07 07:33
Assigned Tograham 
Platformx86OSMac OS XOS Version10.5
Product Version6F95 
Target VersionFixed in Version6L02 
Summary0000479: ALMOST ALL does not operate correctly at low object counts
DescriptionAccording to the manual, the phrase 'almost all devices are switched on' would only be true if at least 80% of the devices in the game are switched on. However, if the total number of devices (switched on or not) is 4 or less, it reverts to the same behaviour as described for ALL BUT ONE.

That is, if there are two devices then one of them being on qualifies as ALMOST ALL. If there are three, then only two of them need to be on. If there are four, then three of them need to be on (which is still not 80%).
Minimal Source Text To Reproduce
The Tool Room is a room.

A switched on device called a blue button is here.

A switched off device called a red button is here.

When play begins:
     if almost all of the devices are switched on, say "Almost all of the devices are switched on."
Additional InformationI also tried it with people instead of device (testing if they are male or female), and I tried 'if almost all of the devices in the tool room are switched on'. Same bug every time.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
jmcgrew (administrator)
2010-12-20 19:04

This is the offending line in the generated Prop_0 routine:

    if (qcy_0 >= 8*qcn_0/10){

qcy_0 is the number of switched on devices (1), qcn_0 is the total number of devices (2). 8*2/10 rounds down to 1, so the condition passes even though only 50% of the devices are switched on.

Eliminating the division should fix it:

    if (10*qcy_0 >= 8*qcn_0){
Ron Newcomb (reporter)
2010-12-21 15:32

I thought the 80% number was just a guideline? Especially since the fuzzy comparisons like "some of" and "most of" are intended for narrative variation, not hard calculations. But if so, then the language in 6.15 that reads "at least 80 per cent" might need to be modified to "roughly eighty per cent".
graham (administrator)
2014-02-10 13:53

It really isn't clear what the linguistic meaning of "almost all" is, when applied to very small sets, but I agree that it probably shouldn't be determined by integer rounding errors, so I've accepted the change.

- Issue History
Date Modified Username Field Change
2010-12-20 10:44 Laroquod New Issue
2010-12-20 19:04 jmcgrew Note Added: 0000914
2010-12-20 19:04 jmcgrew Status new => confirmed
2010-12-20 20:05 jmcgrew Category Actions => Phrases and functional programming
2010-12-21 15:32 Ron Newcomb Note Added: 0000916
2014-02-10 13:53 graham Note Added: 0002469
2014-02-10 13:53 graham Status confirmed => resolved
2014-02-10 13:53 graham Resolution open => fixed
2014-02-10 13:53 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker