These are the user documents for Reckoner, V1.1. 1) What is Reckoner? Reckoner is a program that helps you do the pools! Every week, you tell it which teams are playing, and it comes up with the selection that it thinks are most likely to be drawn. When the results come in, it tells you how many points you got. As the weeks go on, the program can `learn' and adapt its algorithm to (hopefully) improve the accuracy of the predictions. This program is freely distributable. Do with it what you will. No charging money for it beyond reasonable media costs though. 2) Some History and a Disclaimer. Reckoner was written several years ago (before the days of WB2). It originally consisted of a suite of programs. As time progressed however, the suite was merged into a single program, and the development system moved to WB2. The current version runs OK under WB2 and WB3. Maybe it still works under 1.3, I don't know. It certainly used to :-). Reckoner has been updated from time to time over the years, but I never really intended it to be released. However, more recently I have decided that I might as well let a few other people play with it, hence this release. Please remember, however that it lacks some of the polish that I would normally apply to a program of this type, as while writing it, I have been concentrating more on the algorithms and less on the chrome. These docs are not particularly in depth - just a quick overview, so feel free to experiment to get the hang of the program. 3) How does it work? The pools are an essentially unpredictable thing, but everyone has their own pet theory. What reckoner does is sort the coupon into order, so that the team it thinks is most likely to draw is at the top of the list, and the team least likely is at the bottom. It is up to you to use this list, coupled perhaps with suggestions from the newspaper, or your own ideas to then mark the crosses on the coupon. What you *don't* do is take the top few suggestions and mark them down. What I generally do is choose most of the entries from the top half of the prediction list, and scatter in a few unlikely ones from the bottom half. The program works by looking at 5 factors, which might have a bearing on a team having a draw. * League position. I presume that teams close together in the football league are more likely to draw than teams far apart. The program takes home advantage into account. * Past history. The program keeps a history of the results of the teams previous 10 games. Some teams may be more likely to draw than others, perhaps because of team tactics. * Previous Draws. This is similar to the the previous item (2) but looks at the total number of draws this team has had. * Motivation. Teams near the top and bottom of the league have their prowess artificially enhanced. Teams near the top are generally fighting for the championship, while teams near the bottom are generally fighting against relegation. * Scoring power. This looks at the number of goals a team generally scores while at home or away. At prediction time, these 5 factors are all added up (not in the order above), and combined according to the prediction equation. By default the prediction equation combines them all equally (20 20 20 20 20) which means that 20% of each factor is used to make up the final prediction. As the results come in though, the program optionally varies each parameter +/- 5% to see if it can come up with a combination that offers a better prediction. (in this context, better prediction means that more draws are in the top half of the prediction list, compared with the bottom half). 4) What does it need? In order to perform predictions, Reckoner needs access to some information. This basically takes the form of some sort of league tables. The program keeps track of the tables from the results you enter, so you have to make sure you keep it up to date. The other alternative is to just enter the weekend results. The league tables you get from this will not match up with the real ones, but will give the program an idea of the relative strengths of the teams. All the rest of the information the program uses is gleaned from the results you enter. The program does provide a league table editor, but it is a bit cumbersome to use, and while it is OK for making small changes, you wouldn't want to use it to bring everything up to date very often. 5) How does it do? Reckoner has been running for several seasons now, on both the English and Australian leagues. On the whole, it manages to get twice as many draws in the top half of the list as are on the bottom half. Some weeks it does better, and other weeks finds the draws scattered all over the place. Still, it is perhaps no worse than using birthdays, or whatever, so what the heck. INSTRUCTIONS Ok then, this archive should contain the following files: Pools : Actual program executable. Coup.dat : Coupon data file. This contains the crosses marked on the coupon. Fix.dat : Fixture data file. This contains the fixtures marked on the coupon. Wdl.dat : Won-Drawn-lost data file. This contains the results of the previous 10 matches for every team. League.dat : League tables data file. This contains the league tables. Pred.dat : Prediction data file. This is generated by the program when you do a prediction. This probably doesn't need to be here. fix_top.txt : -| A couple of text files that I use for pretty-printing the fix_bot.txt : -| prediction list. Reckoner.docs : This documentation file. The data files are provided as an example, so that you can have a play with the program. They are old (I think they come from around the end of the 92-93 British season), and you will have to enter a fresh set before you can use the program. There is an additional file called Equ.dat that contains the prediction equation. The program will generate this, so it is not supplied. The Pools program is run by typing Pools at the CLI. The program will not run reliably from the workbench. A screen will open with some labelled selection squares on it. You can then click on the square for the function you want. These squares should really be nice pretty gadgets, but in 1.3 days these were a pain to do, and I never really got around to it. The selection screen looks something like this: [] Enter this weeks fixtures into the computer [] Do the predictions for this weeks fixtures [] Enter into the computer the crosses marked on the coupon [] Enter scores (results) into the computer [] Free-form edit of league tables [] Free-form edit of the win-draw-lose history [] Quit from the program The first set are the general functions used week by week, while the second set are support utilities that are used less often. Some of the selections may be disabled (filled with a dot pattern), depending on which data files exist. Feel free to browse around using the supplied data files, although keep a spare set handy, as selecting various options may cause data files to be deleted or updated. LEAGUE TABLES The first thing to do is to enter a set of league tables. Obviously, this only has to be done once a season. To do this, delete all the old data files (#?.dat). Then run the program, and select "Free-form edit of league tables". The Edit League Data File screen will be displayed. This will have three gadgets on it: Add, Delete and Quit. Delete will be disabled (as you can't delete when nothing is there). You can now enter each division, by clicking on Add. A requester will prompt you for the name of the division, and the number of teams in it. You can pick any name, but you should be aware that certain names are recognised by the program. A name of "Division 1", "Division 2" or "Division 3" has a slight effect on how the teams are sorted into order. More importantly, certain leagues have a different points scoring system. If the league name starts with "Scottish", "Victoria", "W Australia", or "S Australia", the program recognises this. So I would recommend that for the british league, you pick similar names to the ones in the example data file. Once the division name and team count are filled in (remember to press the return key), click on OK to enter the information into the program. As you add divisions, they appear in the own gadgets down the centre of the screen. You are limited to as many divisions as will fit in one column, so when you hit the bottom of the screen, that's it. You will also notice that the Delete gadget becomes available, once there are divisions to delete. Having entered each division, you can now fill the teams in. By clicking on each division gadget, the contents of that division will be displayed. The teams are displayed in a grid, much as you might see them in the league tables, as printed in the newspaper. Any of the fields can be clicked on to edit that statistic. First of all, click on the team names, which default to Team 1, team 2 etc, and enter the real names. At the top of the screen in the title bar are two arrow gadgets. Use these to move up and down the division if there are more teams than will fit on the screen. The down arrow scrolls down 1/2 screen, the up arrow scrolls up 1 screen. All of the stats start off as 0. If the season has started, however, you can fill in the real values. You do this by clicking on the stat you want to change (it will be highlighted). Then use the arrows on the right hand side of the screen to increment or decrement this value. It seemed like a good idea when it was designed, but after using it, it's a bit of a pain. The stats stored for each team are a mixture of standard ones, plus a few extra ones that you won't recognise: Team - The name of the team P - Number of games Played W - Number of games Won D - Number of games Drawn L - Number of games Lost F - Number of goals scored by the team (For) A - Number of goals scored by other teams when playing this team (Against) P - Points (This field is calculated by the computer, so while you *can* edit it, it's a bit of a waste of time) PD - Points Deducted. This is for when the football league knock points off because a team did something naughty. Enter -1 in this field if 1 point has been deducted. HGO - Home goals. The number of goals scored at home. HGA - Home games. The number of games played at home. AGO - Away goals. The number of goals scored away from home. AGA - Away games. The number of games played away from home. Once you have finished fiddling with the stats, click on the close gadget to return to the Edit League Data File screen. Note that the points (and league positions) are only calculated when you enter the edit screen. As you change the stats, no points will be calculated and no teams will change place. You must exit and then return to the screen to see the effects of the edit session. Once all the stats have been entered, click on the Quit gadget, and once you have answered the "Do you want to save changes" requestor, the league will be saved to disk (in the league.dat file). Of course, you don't have to enter all the divisions in one go, you can enter one division, save it, and then some time later add another, and so on. Once *all* the divisions are entered, you can set up the WDL history as described in the next section. From now onwards, clicking on the "Free-form edit of league tables" gadget from the main screen will cause the saved league tables to be read in from the disk file. You can see this working by selecting this option with the example data file. WDL HISTORY WDL stands for Won-Drawn-Lost, and it keeps track of the result of the last 10 games for each team. It must be initialised before use, however. You do this simply by clicking on the "Free-form edit of the win-draw-lose history" gadget on the main screen. This must be done at least once after the league has been completely entered, but before any results are entered. The program recognises the first time the program has been run, and sets up the history files. All results typed in from this point onwards are stored. Clicking on this gadget causes the Edit screen to appear. This is similar to edit division screen, containing a grid of stats for each team. Every team in the league is stored, in the order they were entered. To the right are 10 weeks of history information, with the oldest information at the right hand side of the grid. The grid starts off full of ? characters, which means that the program doesn't know what happened. As results are entered into the program, the grid will fill up from the left, and after 10 weeks, old information will drop off the end. The information stored consists of a single character: ? - means no information exists J - means the team got a jackpot (1-1) draw L - means the team lost N - means the team got a no-score (0-0) draw S - means the team got a score draw W - means the team won As with the division editor, the arrow gadgets at the topm of the screen scroll up and down the list. Similarly, by clicking on a stat, (which highlights it) and using the arrows at the right hand side of the screen, the values can be changed. Each click causes the following circular progression: ? J L N S W ? The editor can be exited by clicking on the close gadget. As before, a requestor is displayed to ask if you want to save any changes. Reckoner is now set up and ready to predict. The editors can be used at any time to inspect the data files, and `mend' and wrong data. The program should, however maintain the data files from the results information entered. DOING PREDICTIONS: - Entering the Coupon The prediction sequence starts when the pools coupon turns up. Your first task is to tell the computer what teams are playing this week. To do this, click on the main screen "Enter the weeks fixtures into the computer" gadget. This will cause a screen to be displayed, containing a gadget for every team the program knows about in alphabetical order. The team names have to be truncated to fit, so as you move the cursor around, the full name of the team under the cursor is displayed in the title. At the bottom of the screen is the coupon window. This will show `1', because you are just about to enter coupon fixture 1. To enter the coupon into the program, just click on pairs of team, so if No 1 on the pools coupon is Man Utd vs Man City, just click on the Man Utd gadget, followed by the Man City gadget. You will see the coupon building up in the coupon window. If you click on abort at the top of the screen, it gives up and forgets about any coupon entries you have made. Reckoner warns you about trying to match two teams in different divisions, but lets you do that if you want to (for Cup games, etc). I can't remember what happens at the prediction stage for these matches, though. The coupon window can be moved in the usual way, to reveal the teams that are underneath it. If you make any mistakes, click on delete, which will destroy the last full entry. The program knows that it expects 58 pairs, so the screen will exit when you click on the last team. Make sure you get this one right, as it is the only one you can't delete and redo. You will notice that there is a gadget labelled non-league. Use this to enter any teams that are not stored in the computer league tables (such as non-league teams). Since the computer has no information about non-league teams, it will ignore them when doing predictions. When you have entered all 58 coupon entries, Reckoner will store them in the data file coup.dat for use later on. Note that only 1 set of coupon entries can be stored. You can't enter 3 weeks coupons in one go. (Well, you *can*, but the first 2 will be overwritten)! DOING PREDICTIONS: - Predicting Reckoner now has enough information to do a prediction. This can be done in the same session as the coupon entry, or some other time, it doesn't matter. Click on the main screen "Do the predictions for this weeks fixtures". The computer will have a brief think, and then display the prediction of the week. This is actually quite fast (only a second or so). The prediction is displayed on a screen, with the most likely draw prospect at the top left, and the least likely at the bottom right. As you move the cursor over the teams, the probability will be displayed in the titlebar. The team names are colour-coded for home wins, aways wins and non-league (no prediction). A colour key is displayed on the screen. The home/away wins are a late addition to the program, and only a rough guess is worked out from the positions of the teams in the division. This screen in the only one in Reckoner with a menu, where an option exists to allow you to save the prediction screen as a text file. This will be called fix.txt. What I do with this is use the fix_top.txt and fix_bot.txt files to get a nice pretty printout of this. The ones supplied with this archive are the ones I use. generally, I join them together with the CLI command JOIN fix_top.txt fix.txt fix_bot.txt as FIX.OUT and then print out the fix.out file. You can edit these files as you see fit to suit whatever printout you want. Clicking on the Quit gadget moves on to a suggestion screen. This is biased towards people doing 8 from 11 entries. I don't do this sort of entry any more, but never got around to removing this screen. The suggestion screen displays some suggested numbers from the predictions that were worked out. These are: 11 Most likely draws: The top 11 draws from the prediction list. This does not mean that they are a good choice, because the program aims to get more draws in the top half of the list than the bottom half, not to get them at the top of the list. 11 Random choices from the top half: Given the aim of the program mentioned in the previous comment, these numbers might be useful. 11 Ratio 2:1 most likely to bottom half: This takes 2/3 of the numbers from the top of the prediction list, and mixes in 1/3 unlikely draws from the bottom half of the prediction list. This is perhaps less of a good choice because it uses numbers from the top of the list. 11 Ratio 2:1 top half to bottom half. This takes a random choice of 2/3 of the selections from the top half of the list, and mixes in 1/3 of the unlikely draws from the bottom half of the list. Remember, just because the program thinks they are unlikely doesn't mean they can't be draws. 11 Random choices. Speaks for itself, really. Some suggested home wins - just picks the top home wins from the prediction list. Some suggested away wins - Same for away wins. Whether you use these numbers or not is up to you. Personally, I use the prediction list only. Clicking on the Quit gadget exits back to the main screen. DOING PREDICTIONS: - Marking Crosses Having chosen your numbers, you can now enter them into the program. This part of the program is optional, and I must admit that I don't use it anymore. As written, it is set up for full perms only, and I no longer do full perm entries. If you want to enter the coupon in, click on the "Enter into the computer the crosses marked on the coupon" gadget on the main screen. This displays a copy of the treble chance coupon, where you can mark crosses just as you would on the real coupon. Remember that only full perms are allowed. Clicking on abort will give up, and clicking on quit moves on to the next screen. This allows a 10 homes entry to be made, followed by a 5 aways entry. Only 10/5 straight lines of crosses are allowed, no plans, etc. A final click on Quit saves the information to disk. The program was designed this way, because this was the way I used to do pools entries. It really needs a redesign. I am currently working on a separate program to handle plans and perms, as they can get very complicated. DOING PREDICTIONS - Entering Results This is the important part. The results are used not only to find out how many points you got, but also to update and maintain the league tables and wdl history. Click on "Enter scores (results) into the computer" to display the Enter Results screen. This contains 3 gadgets: Coupon, Free and Quit. The Quit gadget obviously returns to the main screen, asking to save any changes. The other two, Coupon and Free allow the results to be entered in 2 different ways. The coupon gadget will only be enabled if there is a coupon entry stored in the computer. This allows you to go through every game on the coupon, entering the result. This option would be used when the results are known at the weekend. The second option allows the results of games not on the coupon to be entered. This might be used for midweek games, or weekend games not on the coupon. This option will be discussed first. Clicking on the Free gadget displays a screen containing every team (just like when entering the coupon). Also displayed is the score entry window. This can be moved around in the usual way to reveal the teams hidden underneath. By clicking on pairs of teams from the main window, they teams are copied into the score entry window. You can then click on the numeric gadgets to enter the score for that game. Numeric gadgets exist from 0-5, and clicking on them will transfer the score into the display gadget just to the right of the numeric ones. If the score comes to more than 5 goals, you can click in the display field directly, and enter the score manually using the keyboard. The program warns you if you try to enter a score for two teams in different divisions. You can then click on Quit to enter the score, or Abort to give up. Clicking on Quit on the main screen exits back to the Enter Results screen. Clicking on the coupon gadget follows a similar procedure. This time, the coupon is displayed, with teams that you have marked crosses by (if you did the marking crosses stage) drawn in a different colour. There is an on-screen key to what the different colours mean. By clicking on each fixture in turn, the teams are transferred to the score entry window, just like the Free method just described. Once again, you enter the score by clicking on the numeric gadgets (or entering the score directly in the display gadget). The Abort and Quit gadgets give up or enter just like before. This time however, there is a third gadget you can use to enter the score, labelled `Pools Panel'. If you enter a team using this, the score is used to calculate the number of points you got, but the result does not update the league tables. This would be used for pools panel results, which are valid for the pools, but have no affect on the league. The teams that have results entered for them are removed from the coupon, so that you can see how many are left to enter. The scores for non-league games are obviously not put in the league. For these games, you can enter any score that gives the correct pools result (Win, Draw, Jackpot, etc). As long as you enter the results for at least the teams you pick, the program will tell you how many points you got. If you enter *all* the results (and I can't think of a good reason why you shouldn't) the program also tells you the maximum number of points available. The program then moves into learn phase. This only happens when *all* the results have been entered. If you answer Yes to the question "Do you want to change the prediction equation?", Reckoner compares its prediction with the actual results, and looks for a better choice of numbers for its prediction equation. It displays the number of draws (any draw will do) in the top 1/2 of the coupon, and then varies the equation parameters (remember that they start off at 20 20 20 20 20) by +/- 5, looking for a better set. The first 3 are continually updated, so that you get an idea of how this is progressing, so when it reaches 5 5 5, the search is complete. It also displays what the best set of draws in the top half of the coupon are at each stage. If it finds a better set it tells you the new set and writes them to disk for use the following week, otherwise it just tells you that it couldn't find a better set. It is probably better if the league hasn't changed since the original prediction was made, so what I do is store the midweek results (without entering them into the program) and then at the weekend, put all the midweek results in after the learn has completed. It's not perfect, but there you go. Be aware also that this learn operation can take a long time, perhaps up to an hour on a 68000, so you might make a cuppa, or explore the wonders of multitasking in the meantime. People with faster processors fare much better. On a 68040, the learn sequence is over in a few minutes. Once the learn is complete (or if you have skipped it), the program asks if you want to update the league tables, and the program is ready for any more results, or the entry of the following weeks coupon. KNOWN FAULTS The program does sport one or two known gotchas, (and failure to win top dividend every week doesn't count) so here they are: 1) Program writes text (like wdl history editor) to stdout even when run from WB. This could crash on 1.3. This is the reason I advise you not to run the program from workbench. 2) Just occasionally, a couple of the fields in the league tables get corrupted, so that they hold rediculously large values. For the life of me I have not been able to figure this one out. Therefore, a hack (yuk) has been put in, so that if one of these large values is detected, it is replaced by 0. If this occurs, a message will be printed on the CLI saying which team was affected, so that the free form table editor can be used to fix it. 3) When selecting wdl history, program sometimes asks to save changes on exit even when nothing has been done. Not super-critical, I think. 4) Occasionally get 'could not allocate memory' errors when typing in new tables. Doesn't seem to cause any problems, however. 6) Under 2.04, various windows have borders slightly munged. Due I guess to some difference between 1.3 and WB2. Again, doesn't seem to cause any problems. Reckoner runs without enforcer/mungwall hits, so I don't think it does anything really naughty. THE FUTURE well, Reckoner was big fun but times move on. I am happy to update Reckoner to cater for variations in the rules (like when Jackpot draws came in), or changes in the number of points for a win, etc (this should be a tooltype really). There are unlikely to be any major updates to the program mainly because I don't get time. However, I am currently kicking around a design for a Plan/Perm manager which is a bit like the enter crosses/results part of this program, except that it can deal with plans. This program will be written in C++. Let me tell you, line of crosses and blocks of lines are just *perfect* for being made into C++ classes. SUMMARY This program was written for just a bit of fun, and I hope you take it in the same way. Feel free to contact me electronically at sgoddy@cix.compulink.co.uk CIX/Internet or 100014,674 Compuserve for any comments, large wodges of cash, promises of fame and fortune, etc.