Rev 23 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | !read $deffile final |
||
3 | !if $speculate=yes |
||
4 | thisscore=0 |
||
5 | !exit |
||
6 | !endif |
||
7 | |||
8 | !for i=1 to $anscnt |
||
9 | !if ?? isin $(ans$i) or $(ans$i)=$empty |
||
10 | partial=yes |
||
11 | thisscore=0 |
||
12 | !exit |
||
13 | !endif |
||
14 | !next i |
||
15 | |||
16 | n_=!itemcnt $gotlist |
||
17 | !for i=1 to $parmcnt |
||
18 | !if $(weight$i)>1 and $i notitemof $gotlist |
||
19 | speculate=yes |
||
20 | thisscore=0 |
||
21 | !exit |
||
22 | !endif |
||
23 | !next i |
||
24 | t_=0 |
||
25 | !for i in $gotlist |
||
26 | !if $(weight$i)<=0 |
||
27 | !advance t_ |
||
28 | !endif |
||
29 | !next i |
||
30 | !if $n_-$t_<$minask |
||
31 | speculate=yes |
||
32 | thisscore=0 |
||
33 | !exit |
||
34 | !endif |
||
35 | |||
36 | uselesscnt=0 |
||
37 | !for i in $gotlist |
||
38 | !if $(weight$i)<=0 |
||
39 | l=!line 1 of $(parm$i) |
||
40 | useless=!append item $l to $useless |
||
41 | !advance uselesscnt |
||
42 | !endif |
||
43 | !next i |
||
44 | useless=!replace , by , $ in $useless |
||
45 | |||
46 | gotcnt=!itemcnt $gotlist |
||
47 | !if $thisscore>0 and $gotcnt>$minask |
||
48 | thisscore=$[$thisscore*$scorepower^($gotcnt-$minask+$uselesscnt)] |
||
49 | !endif |
||
50 |