项目作者: mickymuis

项目描述 :
Pattern Mining in Reduce-Fold Cellular Automata
高级语言: TeX
项目地址: git://github.com/mickymuis/vouw.git
创建时间: 2017-11-25T11:54:42Z
项目社区:https://github.com/mickymuis/vouw

开源协议:

下载


Vouw

Pattern Mining in Reduce-Fold Cellular Automata

Vouw is a command-line interface for printing an analysing Reduce-Fold Cellular Automata (RFCA) and is an academic implementation of the VOUW algorithm. For the visualisation of RFCA, please see the user-friendly RFExplore:
https://github.com/mickymuis/rfexplore

Builing Vouw

Vouw is coded in C99 and should run on anywhere. I may have used some Linux specific functions calls, so if you run in to any trouble please notify me.
Compiling is easy, just run in your terminal:

  1. git clone https://github.com/mickymuis/vouw.git
  2. cd vouw
  3. ./configure
  4. cd build
  5. make

The vouw executable is now located in build.

Printing automata

Let’s print our first automaton! For this we pick automaton 2.2.6 and call the print module:

  1. ./vouw print -m 2 -b 2 -r 6 -i 00110 -f 5

If everything is well, this should produce the following output:

  1. 1 1 0 1 0 0 0 1 1 0
  2. 0 1 1 1 0 0 1 0 1
  3. 1 0 0 1 0 1 1 1
  4. 1 0 1 1 1 0 0
  5. 1 1 0 0 1 0
  6. 0 1 0 1 1
  7. 1 1 1 0
  8. 0 0 1
  9. 0 1
  10. 1

The arguments are the same for every module (the first argument after ./vouw). Type ./vouw without arguments to see decriptions for each parameter.

Analysing with VOUW

We can use the VOUW algorithm to compress an automaton and view the compressed output, code table and compression ratio:

  1. ./vouw encode -m 2 -b 2 -r 6 -i 00110 -f 5

Which appearently compresses to the following with a ratio of 81%

  1. C . B . . A . B . B
  2. . . A . B . B . B
  3. . B . B . . A C
  4. C . . A . . A
  5. C . . A . B
  6. . B . . A
  7. C C . B
  8. C . B
  9. . B
  10. C

Now the real power lies in the compression of an automaton with the code table of another automaton. This can be used, for example, as measure of distance. Let’s compress a bigger version of 2.2.6 with the code table of 2.2.7:

  1. ./vouw encode -m 2 -b 2 -r 6 -i 00110 -f 20 using -r 7

Notice the extra using argument. The ratio is now almost 68%, indicating that 2.2.6 and 2.2.7 are quite similar. If we now were to compress the same automaton with the code table generated from 2.2.8, we would obtain a ratio of 108%, indicating that they are less similar.

2.2.6 compressed by 2.2.7’s code table:

  1. . . . G . . E G . . F . . . . E . . E G . G . . E
  2. . G G . E G . E G . E G . E G . E . G E G E . G
  3. D . G D . E G . C G . C D . E D D E G . . D D
  4. G . . . G . E . . . G . E . . . . . E G E D
  5. . . G . E . G . G . . G . E . G . G D D G
  6. D . . . . . . . C . . . D . . . D . . G
  7. D . . . D . . . . . . . . . . C G . G
  8. . . . . C . . . . . D . . . D G D D
  9. D . . . D . . . . D . . . D G G D
  10. B . . . . . . . . . . . B . . G
  11. B . . . . . . . . . . B G . G
  12. B . . . . . . . . . B G D D
  13. B . . . . . . . . B G G D
  14. B . . . . . . . B . . G
  15. B . . . . . . B G . G
  16. B . . . . . B G D D
  17. B . . . . B G G D
  18. A . . . A . . G
  19. A . . A G . G
  20. A . A G D D
  21. A A G G D
  22. A . . G
  23. G . G
  24. D D
  25. D