### A rough index to the minibooks for the Sudoku Experience workshops

There are two introductory models and five workshops. The pages of the mini-books in these are as indexed below. The minibooks can be interpreted as outlining a "tour" of the workshops. Some code extracts and exercises that are presented in the minibooks are included in this index. These are the appropriate focus for technical study of Empirical Modelling using EDEN.

General introduction to the Sudoku script

1. Contemplating and Computing
2. Many contexts for observation
3. How observables are implemented in the model
4. Implementing simple solving rules
5. A simple solving strategy
6. Implementing the simple solving strategy

    %eddi
    ## NB remember to remove the invisible space
    ## from "%eddi " when cutting and pasting
    trueall = all;
    all !! [4];

- Manual implementation of the simple solving rules ...
- Redefining and observing observable values

      %eden
      currdigit = 4;
      ?currdigit;
      %eddi
      ?diffcounttable;

- The automated checking process
- Acknowledgements
- Technical addendum

Introduction to the Web EDEN environment

1. Introducing the Web-EDEN environment
2. By way of practical preparation 1 ...

       %eden
       a = 199;
       b = 20;
       c = 1;
       d is b*4 + 6*c;
       e is a - d;
       f = 336;
       g is float(a)/f *100;
       writeln(e);
       writeln(g);

3. By way of practical preparation 2 ...
4. By way of practical preparation 3 ...
5. Meaning in Empirical Modelling
6. By way of mental preparation ...
7. Modelling in practice
8. Tracking states of mind ...
9. More about way the model was built ...
10. Orientation on the EM Sudoku model
11. A helpful analogy
12. Interpreting interaction with the model

        b_3 = 5; ## change cell value
        b_1 = 4; ## alter the given puzzle
        background_bgcolour="green"; ## redesign the grid display

13. How we shall use the model
14. Variables and observables ...
15. Useful additional features ...
16. Simple commands you can try out for testing purposes

        %eden
        writeln(b2);
        writeln(b_2);
        ?b2; ## returns a string consisting of a single character
        ?b_2; ## returns the integer value of a digit
        b_2 = 3;

Workshop 2A

1. Basic mechanics of Empirical Modelling
2. Guidelines for walkers
3. Observables in the Sudoku model
4. Modifying the display

       %scout
       screen = <A1/B1>;

5. Exercise 1: A basic exercise in Empirical Modelling
6. The six example Scout redefinitions for Exercise 1
   1. `B1_bgcolour = A1_fgcolour; B1_fgcolour = A1_bgcolour; A1_bgcolour = "white";`
   2. `a1 = b1; b1 = "2"; ## a1 and b1 are of type string - hence the quotes around 2`
   3. `A1_bgcolour = B1_bgcolour;`
   4. `A1_fgcolour = B1_fgcolour;`
   5. `A1_bgcolour = if (a1=="2") then "red" else B1_bgcolour endif; ## '==' stands for 'equals'`
   6. `A1_fgcolour = "#38c755";`
7. Lessons to be learnt from Exercise 1
8. Other kinds of observable
9. Restoring the screen
10. Observing rows, columns and regions in the grid
11. Tables in Eddi
12. Some basic Eddi operations ...
13. Table observables defined by formulae ...
14. Some sample queries to illustrate the : and % operations
    1. `?sudokugrid : digit>0;`
    2. `?sudokugrid : colix==4 % rowix, digit;`
    3. `?sudokugrid : colix==4 % digit;`
    4. `?sudokugrid : status == 1 : digit == 6 % rowix, colix;`
    5. `?sudokugrid : status == 1 : colix == 4 % rowix;`
15. Further table operators and definitions ...
16. Exercise 2
    1. What information does the following Eddi query return?

           		%eddi
           		?all - sudokugrid : colix==4 % digit;

    2. How would you formulate a query to return the digits not in row 6 and not in column 7?
    3. What does the observable rowband1 describe? Why is the definition of rowband1 on the previous page not a very good one?
    4. Make your own definition of a new table called top3rows that defines the same result as rowband1 but uses a formula that contains '+' rather than '.'. Do you in fact need to use either '+' or '.'?
    5. Interpret the definition of the observable possdig12 on the previous page. Why doesn't it always exactly correspond to "the set of plausible digits for the cell B1"?
17. What we've illustrated about the Sudoku model
18. Putting it all together

Workshop 2B

1. Practical exercises in Empirical Modelling
2. Exercise 1: Adapt the Sudoku grid to make a simple form of electronic blackboard on which to demonstrate primary school arithmetic.
3. Helpful pointers
4. A note on definition and assignment
5. Arithmetic in Eden
6. The classical computer programming problem
7. Further help for Exercise 1
8. Exercises in converting between coordinate systems
9. The row-col and region coordinates for the Sudoku grid
10. Exercise 2: Devise Eden definitions to convert from row-col to region coordinates.
11. Exercise 3: Devise Eden definitions to convert from region to row-col coordinates.
12. Further guidance for Exercises 2 and 3
13. Answers to Exercises 2 and 3

Workshop 2C

1. Task 2C: Building colour variations of sudoku
2. Colouring cells
3. Making colours depend on cell contents
4. Operators you can define yourself
5. Using plausibles for colouring
6. Recreating colour sudoku
7. Extensions to colour sudoku

Workshop 3A

1. Observables and agency in the EM Sudoku model
2. Revisiting the model
3. A reminder
4. Exercise 1: Agency in the EM Sudoku model
5. Programmed agency
6. Exercise 2: More agency in the EM Sudoku model
7. Hint for Exercise 2
8. Exercise 3

   Fix your attention on one of the possible Sudoku puzzles only. For each of the following redefinitions that can be introduced into the Input Window, say whether or not it can be made through the display and button interface (i.e. without using the Input Window). (The e4_focus observable says whether or not the cell E4 is selected.)

       	1. a_1 = 8;
       	2. b_1 = 7;
       	3. c_1 = 10;
       	4. d1 = "";
       	5. a_1 is i_9;
       	6. e4_focus = 1

9. More about Exercise 3
10. Answer to Exercise 3
11. To summarise ...
12. Thinking about solving Sudoku
13. Automating simple steps in solving a Sudoku puzzle

    The simplest deductions we can make when solving a Sudoku puzzle involve checking (a) whether there is only one plausible digit for a cell, and checking (b) whether there is only one location for a particular digit in a given row, column or region. Imagine that we are focusing on one row r of the puzzle, and that we can see the number of plausible digits that there are for each cell in that row. Now suppose that one of the digits x that we need in order to complete the row is discounted, and that we recalculate the number of plausible digits there are for each cell in the row.

14. Exercise 4

    Explain how you may be able to determine where to put the digit x in row r according to criterion (a) and (b) by inspecting the values of the counts for the row r before and after we discount the digit x

15. Hint for Exercise 4
16. Automating our technique
17. Interpreting the definition ...
18. Automating the checks for (a) and (b)
19. Rough and ready automation of the manual procedure
20. Using the Sudoku model to record hidden knowledge
21. An illustrative example
22. Adding "hidden" information to the model

Workshop 3B

1. Applying Empirical Modelling in practice
2. Cricketing concepts revisited
3. Adding agency to the cricket model
4. Exercise 1

   Before reading on, think about what needs to change when a single ball is played by a batsman. Take a few minutes to reflect on what single observable can be used to account for the changes to all of these observables.

5. Extending the model
6. How the observables depend on the scoring record
7. An Eden function to relate a, b and c to the scoring record
8. The extended scoring model
9. The dynamic scoring model
10. Using the model
11. Automating human agency
12. A computer agent to update the scoreboard
13. An agent to assist Sudoku solving
14. Exercise 2 The following template defines a suitable Eden agent that will insert a digit in the cell D1 when there is no other candidate for that cell:

        proc D1_checkonedigit: ... {
        	if ((...) && (...) ) ## the && stands for 'and'
        	d_1 = possdigit14[1][1];
        }

    Your task is to supply:
    - the missing observable that is required to trigger the update
    - the missing conditions that have to be substituted in the brackets after the if
15. Hints on Exercise 2
16. Making use of agents in Sudoku solving
17. Towards more advanced solving methods
18. Automating patterns of reasoning
19. Exercise 3

    Why is it so inefficient to directly imitate the check on counts of plausibles that we might carry out for each digit, and each row, column and region in turn?

20. Towards more efficient automation
21. Step 1: Computing the effect of changing 'all' on the plausible counts for all cells
22. Displaying the counts of plausibles before and after changing 'all'
23. Deciding whether a given digit has just one place in a row
24. Putting it all together
25. Displaying the result