Author | Message |
---|---|
rabbott
Posts: 1649
|
Posted 20:19 Oct 02, 2019 |
In today's (Wednesday) class we talked about implementing Hint 1 on the homework. We also talked about cheating by using information that depends on the problem solution. In particular, since 3 and 4 are not assigned to any variable, they are removed from all domains. Also, since we know that O gets the value 0; M gets the value 1; Y gets the value 2; ... S gets the value 9, we order the variables so that they are given values by the search program in that order. With these two changes, only 8 assignments are required. (8 is the minimum since each of 8 variables must be assigned a value.) The code that implements these features is available here: send_more_money.py and csp.py. |