Many test files should be anonymized and given to the public

Started by Liviu Lalescu, October 31, 2026, 07:11:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

Hmm... we are almost ready with the anonymization, but I am not sure I am allowed to publish even the anonymous files... because of legal problems (the AI says that the structure of the document may lead to the real institution data).

Liviu Lalescu

I am afraid to release the anonymous files. I must think some more...

fetviewer

Liviu, I agree with your concern. The script replaces the names, but the structure stays: the numbers of teachers, groups and rooms, the group sizes, the hours of the day, the teachers' not-available times and, in a solved file, the timetable itself. Somebody who knows the school, or who finds its timetable on its website, can still recognise it.

I also thought about other ways: adding dummy activities, doubling the data, or removing some activities. They do not help much. A change that keeps exactly the same timetable problem also keeps its structure, and a change that hides the structure also changes the problem. Older files are safer, because the data changes every year, but the risk does not go to zero. Permission from the schools is the only clean way.

May I ask what the main purpose of the files is? For example, to test FET's speed and correctness on real, difficult cases, or to give users examples to learn from?

If invented files could serve that purpose, I could try to generate synthetic schools: new data with realistic sizes, rules and difficulty, but from no real institution. FET itself would show whether each file is easy, hard or impossible. Such files would have no legal problem.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

Liviu Lalescu

Hello, fetviewer,

The purpose of these files is to check the algorithm, in these situations:

1) If we change the FET code, we need to check that the old files are still solvable;
and
2) If somebody else tries to write a new program compatible with FET, but maybe in another language, the new program must generate identically (same starting and ending seeds), or generate differently, but with the same behavior (comparable solving times, and for impossible files a similar behavior).

Using some crafted examples, carefully modified, I obtained some very useful files, which helped me to test some new constraints; I found and avoided important logic bugs in this way.

Edit: yes, artificial crafted files would be interesting and useful!

fetviewer

Thank you, Liviu, for explaining the purpose. Invented files can serve both of your cases, so I started a generator.

It is a command-line program that writes invented schools as .fet files. It now covers 137 of the 210 constraint types of FET's Official mode, and the aim is all of them. The other modes (mornings-afternoons, block planning and terms) are planned too. For each file, it first builds a complete timetable and then adds only constraints that this timetable satisfies. FET itself must accept a copy of the file with every activity locked to that timetable. An impossible file gets one deliberate contradiction, and its reason is written beside the file.

The generator is based on FET's source code, and it will be open source under the AGPL v3, like FET. I will post it here when it is ready.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

Liviu Lalescu

Thank you, fetviewer! You are welcome!

I like the idea of the inverse direction of creating a file!  :)

I see that you invest a lot of effort and work in your/our software.

fetviewer

Thank you, Liviu, for your kind words.

A short question about names. Is it OK for you if I call the generator "FET-Synth"?

And for tools that I may contribute later: is "FET-" as a prefix OK, or do you prefer another naming convention?

These tools follow FET's licence (AGPL v3), and they say that they are based on FET. I only want to check this with you first.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

Liviu Lalescu

Thank you for asking me my opinion about the naming convention, fetviewer! However, it is @Volker Dirr  who will decide about this.

Volker, please let us know your opinion!

Volker Dirr

#38
hmm... Thinking about that problem, I see less problems in a name like "FET-Synth" if it is Open Source and based on FET sources than in a name like "FET Viewer" that is closed source and commercial.

Liviu, don't forget that "FET Viewer" isn't doing it since he is a teacher or love timetabling tools. He owns a software company that sells several other software products, not only "FET Viewer". He has a Ltd company and he must and will use it to earn money. Since he wrote already parts of if further development goals, it is already obviously what he is doing. He will add more web based tools. Next converting the FET generated and then additional tools. Since he is force to do the FET Generator open source under AGPL he will then use his database as reference for his own addition tools, so he can write other additional tools closed source (if he doesn't use there also other Open Source software like he used FET). It might become in a few years difficult for customers to see/understand that all the 20+ years long work on FET is from you and not from fetviewer. This might be a problem if guys see him first. They will pay him (by the way it is pretty expensive to pay just for his viewer 24€ per month out of sight of a customer). They will also pay for his later independent other tools. Those users will not donate any more to you, since they payed already too much. And to be "fair", you sadly "earned" much too less money in the last 20 years, since most schools sadly always try to pay as less as possible. There are only a few guys that understood it is more than useful to donate to you. I am always a bit sad if I calculate how less money was donated totally to you while I know at the same time you spend your whole life into this project.

On the other hand I also don't think earning much money with selling software is possible in the future anymore. Writing software tools become so easy with AI today. For example the anonymize can be written even by guys that don't know anything about coding in a few minutes with AI. You can see that the "Synth" tool is also written in under 4 hours. That is impossible again for a human in this short time, but AI can do it in a few minutes. It will similar with many other tools in the near future. Guys that don't know how to code will just vibe code those tools with AI in a few minutes. Even my boss, who can't code, already wrote a few tools that we use at school. It will be easy for all that tools that just "display" data or do easy "managing data" (Not NP problems). While for generating timetabling (NP) it might take several more years until AI is also good enough to code that (generating! not display only). The generating timetabling stuff is/was the most difficult part. All other parts are, out of view of algorithms difficult, are very easy. hmm....

For the names question: If names from other guys are more like "X for FET" instead of "FET X" other users might maybe understand more detailed that it is not based on the same authors; but maybe I am wrong.

I am busy right now. Let me think a bit more and maybe also other guys can tell what they think about it, even if you/they are not involved.

fetviewer

Thank you, Volker, for your honest words. I understand your concern, and I respect it.

FET is the work of Liviu and you, over more than 20 years. Nothing that we make should hide that.

So we will do three things:

1. Our test-file generator has a new name without "FET" in it: TimetableBench.
2. Our open tools page now has a short note about FET and its authors, with a link to FET's donation page: https://fetviewer.com/tools-for-fet The solver will have the same note. Your message gave us this idea — thank you.
3. We will not ask you more questions here. We do not want to take more of your time.

Thank you again, Liviu and Volker, for your patience and your replies.

Edit: The descriptions of our videos now carry the same note about FET and its authors, with the link to FET's donation page.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

fetviewer

Dear Liviu,

The first example files from TimetableBench are ready. I ask for your feedback before I release the generator.

Update: This first example set is no longer available. TimetableBench 0.2.0 replaces it, with a new example set of 180 invented schools.

Download: https://fetviewer.com/tools-for-fet#timetablebench

What is in the set

The set has 360 invented schools for FET 7.12.0. No school is copied from a real school.
There are 10 schools for each FET mode, difficulty and size:
  • Mode: Official, Mornings-Afternoons, Block planning, Terms
  • Difficulty: easy, hard, impossible
  • Size: small, medium, large

Each school has three files:
  • school-NNNNNN.fet: the file for FET.
  • school-NNNNNN.locked.fet: the same school with its hidden timetable locked. FET accepts this file. This is the proof that the school has a solution. Impossible schools do not have this file.
  • school-NNNNNN.json: how the program made the school, and its statistics. For an impossible school, it also states the contradiction in the rules.

The generator first makes a complete timetable. Then it writes only rules that this timetable obeys. For an impossible school, it adds one rule that makes a contradiction.

How I measured the files

I used fet-cl 7.12.0. For each easy and hard school, FET first checked the locked file. Then FET generated the free file 3 times, with 3 fixed sets of random seeds. The time limits were 60 s for easy schools and 5 minutes for hard schools. For each impossible school, FET ran once.

The results (medians of 10 schools)


ModeDifficultySizeActivitiesTeachersRooms (virtual)RulesProofFET solvedLongest s
Officialeasysmall / medium / large128 / 404 / 13329 / 27 / 849 / 23 (2) / 108 (10)134 / 601 / 252930/30 locked90/900.9
Officialhardsmall / medium / large158 / 480 / 149312 / 30 / 7211 / 26 (2) / 62 (10)207 / 622 / 185830/30 locked30, 26, 10 of 30295.8
Officialimpossiblesmall / medium / large126 / 400 / 13379 / 27 / 849 / 23 (2) / 108 (10)134 / 598 / 252030 stated0/30–
Mornings-Afternoonseasysmall / medium / large146 / 406 / 132910 / 28 / 839 / 23 (2) / 108 (10)142 / 562 / 236130/30 locked90/900.6
Mornings-Afternoonshardsmall / medium / large185 / 494 / 153413 / 30 / 7212 / 26 (2) / 62 (10)197 / 560 / 169130/30 locked90/90115.3
Mornings-Afternoonsimpossiblesmall / medium / large149 / 394 / 135110 / 27 / 849 / 23 (2) / 108 (10)140 / 568 / 240430 stated0/30–
Block planningeasysmall / medium / large80 / 250 / 7126 / 15 / 4016 / 40 (2) / 156 (10)124 / 490 / 165630/30 locked90/901.2
Block planninghardsmall / medium / large91 / 282 / 7764 / 11 / 2816 / 40 (2) / 156 (10)132 / 386 / 101430/30 locked90/901.2
Block planningimpossiblesmall / medium / large84 / 247 / 6986 / 15 / 4016 / 40 (2) / 156 (10)126 / 494 / 164630 stated0/30–
Termseasysmall / medium / large322 / 1326 / 493223 / 93 / 3309 / 23 (2) / 108 (10)289 / 1705 / 820030/30 locked90/905.4
Termshardsmall / medium / large414 / 1700 / 602622 / 78 / 26514 / 28 (2) / 66 (10)435 / 1786 / 641430/30 locked90/9047.7
Termsimpossiblesmall / medium / large319 / 1336 / 502823 / 95 / 3349 / 23 (2) / 108 (10)284 / 1726 / 836830 stated0/30–

The full table for each size is in TABLE.html in the zip. The files also use activity tags (2, 3 and 8 for the three sizes) and split activities.

What I know is not good yet

  • The "hard" Block planning schools are not hard. FET solves them in about 1 second, the same as the easy schools.
  • FET finds every impossible school before the search starts. There are no impossible schools yet that only the search can find.
  • All activities in this set have a duration of 1 or 2 hours. The generator release will also make activities of 3 and 4 hours. An option will set the share of each duration.

If you have time: your feedback helps

  • Are these files useful for your two uses: the check after a change to FET, and the comparison of a new program with FET?
  • What do you want to see different: the sizes, the rules, the difficulty, or the folder structure?
  • What makes a school "hard" for FET, in your experience?
  • What else should the generator let you choose? Tell me which number or rule you want as an option.

The next step: the generator

After your feedback, I release the generator itself: the source code, under AGPL 3. The generator uses FET's source code in two ways. First, for the lists of the rule types that each FET version and mode allows, and of the rules that FET accepts only with weight 100 %. Second, for the meaning of the rule types, together with tests with FET's own program. With the generator, you make test files on your own computer. The commands and the list of options come with that release.

Test files that look like your own files: the profile

The example set uses general sizes. Your own files show what real schools need. The generator can learn this from your files, and your files stay private.

Step 1. The generator learns a profile from your own files.

Step 2. You read the profile. It is a plain text file, so you can check every value before you use it.

Step 3. The generator makes new invented schools from the profile.

What the profile contains:
  • Only numbers, and each number is a range, for example "20–25 teachers". There is no exact minimum or maximum.
  • The sizes: days, hours, breaks, years, groups, subgroups, teachers, subjects, rooms, buildings, virtual rooms, activities and activity tags.
  • The loads: the hours of each group and teacher, the subjects for each teacher, the room capacities.
  • The activities: the share of each duration, and the share of split activities.
  • For each FET rule type: how many of your files use it, how often it occurs, and its weights.

What the profile does not contain:
  • No names, no comments, no ids and no other text from your files. The only words in it are the generator's own words and FET's rule type names.
  • No copy of the structure of a school. Each generated school is new.

How your privacy is protected:
  • The generator runs only on your computer. Your files and your profile do not leave it. Nobody else sees them.
  • A profile needs at least 5 files. With fewer files, the generator stops, because a profile from one school can point to that school. For your own use only, an option lets the generator write the profile and mark it as "not shareable".
  • Your own options always win over the profile. For example, if you set 6 days, you get 6 days, whatever the profile says.
  • The same profile and the same seed always give the same file. Thus a test file can be made again at any time.

I tested this with 6 of FET's own example files. No name or text from those files is in the profile. FET accepted the locked file of all 10 schools that the generator made from it.

Later, if you want, you can share a profile from 5 or more files. Other users could then make test files like yours. That is your decision, and only after you read the profile.

Thank you for your time.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

Liviu Lalescu

Dear fetviewer,

Thank you for your interesting work! I downloaded your archive and tested a hard large file in the Official mode. It is certainly useful. I will test more later.

fetviewer

Dear Liviu,

Thank you for your test of the example files. TimetableBench 0.1.0 is now available, as I promised: the source code, under AGPL 3.

Download: https://fetviewer.com/tools-for-fet#timetablebench

The zip contains the source code, a README with all the commands, and a new example set: 180 invented schools, 5 for each FET mode, difficulty and size, with TABLE.html. There is no ready program. You build it with Qt 6 (the Core module only) and a C++17 compiler. I tested the build on Windows only.

For your further tests, please use the new example set. It replaces the example files of my earlier message.

What is new since the example files

  • The Block planning hard files are now really hard. Before, FET solved them in about 1 second. Now FET solved the small files in 15 of 15 runs (median 0.2 s). In the medium size, FET solved 1 of 15 runs (in 192 s), and the other 14 not in 300 s. In the large size, FET solved 0 of 15 runs in 300 s.
  • A new kind of impossible file: "not-overlapping". FET does not find this contradiction before its search, so it searches until its time limit. FET still finds the other 9 kinds before its search.
  • Activities of 3 and 4 hours: two options set the share of each duration.
  • The hard files also have activities for parts of a group (subgroups).
  • More than 5 times as many invented names.

Test files from your own files: the profile

The program learns a profile from your own .fet files. Then it makes new invented schools with the same sizes, loads and rule types. Your files stay on your computer.

Step 1. Learn a profile. Use one of these commands:

timetablebench learn a.fet b.fet c.fet d.fet e.fet --profile my-profile.json
timetablebench learn my-fet-files --profile my-profile.json
timetablebench learn my-fet-files/*.fet --profile my-profile.json

The second command reads every .fet file in the folder "my-fet-files" and in its subfolders. A profile needs at least 5 files. For fewer files, add "--private". Then the profile is marked "not shareable", for your own use only:

timetablebench learn a.fet b.fet --private --profile my-profile.json
Step 2. Read my-profile.json. It contains only numbers: ranges and percentages. It contains no names, no comments and no other text from your files.

Step 3. Make schools from the profile:

timetablebench --profile my-profile.json --count 50 --out my-tests
timetablebench --profile my-profile.json --difficulty hard --count 10 --out my-hard-tests

Your own options always win over the profile, for example "--days 6" or "--names neutral".

Our example test with your profile, in one command

This command makes 5 schools for each FET mode and difficulty from your profile. Then fet-cl checks each locked file and generates each free file 3 times:

timetablebench --bulk --out my-set --count 5 --modes official,mornings-afternoons,block-planning,terms --difficulties easy,hard,impossible --profile my-profile.json --verify --fet-cl path/to/fet-cl
With a profile, the profile gives the sizes, so there is one size folder "profile", for example "my-set/official/hard/profile". The program then writes TABLE.html and results.json. If the run stops, the same command continues where it stopped. Without "--verify", the program only makes the files.

The command of the new example set

timetablebench --bulk --out example-set --count 5 --modes official,mornings-afternoons,block-planning,terms --difficulties easy,hard,impossible --sizes small,medium,large --verify --fet-cl path/to/fet-cl
"--help" shows every option.

Thank you again for your time.
FET Viewer: view, edit, share and check your FET timetables
fetviewer.com

Liviu Lalescu

Thank you, fetviewer! I am now testing a large difficult official mode file.

Liviu Lalescu

I tested a large difficult official file, and it did not solve after 2h 40m.

Also, I tried on a similar block planning file, also without success, but I saw that you use read teachers. The BP mode is supposed to not have teachers at all. FET will allocate activities with only the subject and students set(s) to FET days (real life teachers) and to FET hours (real life time slots).