FreeBSD 12.2

Free BSD 12.2 is on the horizon, exciting news! My favourite operating system – stable, secure, well documented, and leaves any flavour of linux in the dust. Looking forward to the next stable release! MacOS is awesome (offspring of FreeBSD), Microsoft is ok, linux I’m not a fan and probably never will be.

https://www.freebsd.org/releases/12.2R/schedule.html

P.S. every OS needs a good song ūüėČ https://youtu.be/kZUABAirbE4

Posted in Articles | Leave a comment

Activation Function – A Cubic Hermite Spline ? This is no Sigmoid!

In the midst of writing my semi-neural net compressor I have introduced a scaling function based off the premise of an Activation function for a neural net – stretch and squash. Because I always work within a normalized domain of 0.0 to 1.0 I was looking for a logarithmic type function that would work similar to a sigmoid to bring my probabilities closer to a best guess or at least a better prediction.

Below is a graph showing a hermite basis function of a Cubic Hermit Spline , which acts as a sigmoid in the domain of 0.0 to 1.0. The function is very simple and results are phenomenal. In comparison I show a linear curve, of course with no scaling and a hyperbolic tangent that obviously is skewed to fit within the domain 0.0 to 1.0. I have also tested other functions such as log sigmoid and double exponential sigmoid with decent results. This simple function results in a logarithmic curve that seems to produce amazing results. Of course outside the domain I use, the function is definitely a fake sigmoid.

The formula is very basic: p(x) = -2x^3+3x^2

* ^ = exponent

Activation Functions

 

Posted in Articles | Leave a comment

Generic Compression Workflow

I’ve been developing compression techniques for 17 years now and have many unpublished items. One great thing about compression is it never gets old. Data never changes and Moores law does not apply to the field of digital compression. Data compression is bound by speed, memory, compression ratio very similar to the business triangle of quality, speed, and price.

My most recent soon to be published experimental work follows a generic workflow for compression which I believe can be useful for future rapid development and testing.

The below workflow allows for a base accumulator or multiple accumulators, multiple predictors using different accumulators (models). Those predictors would be put through a mixer or number of mixers. After the mixers produce a final refined prediction of the best guess to the encoder or decoder (depending on the input being a compressed or uncompressed file) and outputs the code or original information and continues along the process back to the accumulator.

What are the benefits of this type of model ? So far it allows for rapid testing of different mixing strategies, different models for predicting, and different rates of change for accumulating statistics. This workflow also allows for the creation of a neural network mixed with traditional compression techniques.

An example of this beneficial strategy is that adding a predictor has no impact or change on the accumulator, multiple predictors can be swapped out or tested at anytime. Changing the accumulator will however have an impact on the predictor using that accumulator as well as the mixer.

 

Posted in Articles | 1 Comment

X-Hex Production Re-started

X-Hex is moving along. I have updated the graphics and started production on my new IMAC. Unfortunately there is a bug with the production software that is causing a delay. I would like to get everything ready to post another video soon (It’s been two years). Let me know what you think.

Posted in Articles | Leave a comment

X-Hex Grid Preview

A little preview of the Grid used in X-Hex. With over 40 3D universes, dynamic HD lighting, and physically based rendering, X-hex has an amazing visual and varied atmosphere.

Click on the images below for a full HD preview.

Backdrop

Backdrop

X-HexGrid2

Backdrop

X-HexGrid1

Backdrop

Posted in Articles | Leave a comment

Frequency Coding Draft Paper

I have attached a draft paper explaining the math behind frequency coding, a method of lossless data compression I came up with. The algorithm has been tested as I have freely available computer source code for anyone who wants to test it. The paper still needs to be complete and is missing the following:

  • Math Cleanup – my terminology needs to be re-worked, its vague and hard to understand¬†ūüôā
  • Decoding Process – important for paper proof – shown in source code on my website.
  • Probability comparison – chart of actual p(x), frequency encoding¬†output, neural network stretch = ln(x / (1 – x))
  • Calgary Corpus Comparison – compare to other arithmetic encoders on this standard data set

This algorithm is fairly intuitive once you understand the concept behind it.

Here is the PDF document:
Posted in Compression | Leave a comment

X-Hex re-ignited!

X-hex is on for it’s second revision. This is in very early stages but is looking very promising. Currently I am developing it in c# mono develop IDE.¬† Graphics, Assets, Audio, Music will all be outsourced some how or another. The goal is to provide a simple game to the majority of platforms including windows, mac, Linux, ios, windows store, xbox , ps3, android and ios. The professional development platform allows for the output to many devices with a single project.¬† The game is currently rendered in isometric 3d using a top down perspective but taking full advantage of awesome graphical effects.

X-Hex

 

Posted in New Projects | 3 Comments

Frequency Coding

The source code below is a bit coder class that can be used for reading or writing a compressed file. The source code provides access to a new type of entropy encoder. This new type of coder uses an algorithm I have created which I call frequency coding. The class I provide is  currently using two symbols, but is not limited to two. A frequency coder is a variant of a range coder with some minor similarities with huffman coding. Without getting into details, the main difference between a range coder and a frequency coder is that a frequency coder does not require the use of multiplication or division by only using the frequencies of the symbols but still retaining fractions, where a range coder or arithmetic coder use the probability to output a codeword. Huffman coding does not use fractions or at least retain fractions as the code is being created, where a frequency coder does, but also requires a sorted list of frequencies from lowest to highest to properly handle fractions. I will be putting out a paper in the near future that will explain how a frequency encoder can work for any number base.

 

download -> bitcoder.h (1604 downloads)

 

/*
Copyright (c) 2013 Chris Chunick, email@chrischunick.com
All rights reserved.

Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by Chris Chunick  The name of Chris Chunick may not be used to 
endorse or promote products derived from this software without 
specific prior written permission.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/

class bitcoder
{

private:
    FILE *fin;
    FILE *fout;    
    unsigned int top,bot,range;
    unsigned int code;
    unsigned int m[32];

    void init()
    {
        passed=0;
        bot=0, top=-1;
        range=top-bot;
        code=0;
        for(unsigned int i=0;i<32;i++)m[i]=(0x7FFFFFFF>>(31-i));
    }

public:
    unsigned int passed;
    unsigned int fsize;

    void initcoder(FILE* fin, FILE* fout)
    {
        init();
        this->fin=fin;
        this->fout=fout;
    }

    void startdecoder()
    {
        for(unsigned int i=0;i<4;i++)fsize=(fsize<<8)|getc(fin);
        for(unsigned int i=0;i<4;i++)code=(code<<8)|getc(fin);
    }

    void startencoder()
    {
        fseek(fin,0,SEEK_END),fsize=ftell(fin),fseek(fin,0,SEEK_SET);
        putc((fsize>>24),fout),putc((fsize>>16),fout),putc((fsize>>8),fout),putc(fsize,fout);
        passed+=4;
    }

    void flushencoder()
    {
        putc(bot>>24,fout);putc(bot>>16,fout);putc(bot>>8,fout);putc(bot,fout);
        passed+=4;
    }

    void fencode(const unsigned int bit, const unsigned int c0, const unsigned int c1)
    {
        unsigned int lbit=(c0>c1),w=31,lo=c0,tc=c0+c1,tr=top-bot;

        if(lbit)lo=c1;

        while(((tc)>=(tr>>w))&&w!=-1)w--;

        if(w<-1)
        {
            if (lbit^bit)bot=(((bot>>w)+(lo)+1)<<w)|(bot&m[w]);
            else top=(((bot>>w)+(lo))<<w)|(top&m[w]);
        }
        else 
        {
            top=bot=bot+bit;
        }

        while((top^bot)<=0xFFFFFF || top<bot)
        {
            putc(bot>>24,fout);
            bot<<=8,top=(top<<=8)|0xFF;
            passed++;
        }
    }

    unsigned int fdecode(const unsigned int c0, const unsigned int c1)
    {
        unsigned int lbit=(c0>c1),w=31,lo=c0,bit,tc=c0+c1,tr=top-bot;

        if(lbit)lo=c1;
        while(((tc)>=(tr>>w))&&w!=-1)w--;

        if(w<-1)
        {
            bit=lbit^((code>>w)>((bot>>w)+lo));
            if (lbit^bit)bot=(((bot>>w)+(lo)+1)<<w)|(bot&m[w]);
            else top=(((bot>>w)+(lo))<<w)|(top&m[w]);
        }
        else top=bot=bot+(bit=code!=bot);

        while((top^bot)<=0xFFFFFF || top<bot)
        {
            code=(code<<8)|fgetc(fin);                    
            bot<<=8,top=(top<<=8)|0xFF;
        }

        return bit;
    }

};
Posted in Articles, Compression | Leave a comment

Operations Control Centre

This is a small dynamic project I have been developing over the course of the year during off work hours. It originated from the idea of having a network map done up specifically for work displayed on two monitors. Instead of using tools to create a flowchart or network topology I built a control that asynchronously allows for communication between the host machine and a destination until the program terminates. Each connection sits in a group and each group can connect to other groups – these features are automated. This is a great tool for everyone to visually see the status of the network in real-time and gives an overview of the network. A quick glance over at this two screen Ops program and you can see what servers are running and which ones are not. Future additions include audio alerts and better video alerts.

 

Ops

 

 

Posted in New Projects, Projects | Leave a comment

X-Hex

X-Hex is a game I programmed a long time ago. This game is still very exciting to play and I believe was ahead of its time when it was written. The idea stemmed from my brother who had described a game to me he had played on the Unisys computers from the 1980’s.¬† E-games wanted to publish this title originally but that deal fell through in order to keep IP and publishing rights.¬† I think in the near future I plan to resurrect this product in all of it’s glory. Today this game would be perfect for a tablet or mobile device which did not exist back when it was created. The best part of programming this game was the artificial intelligence.¬† I designed the multiplayer aspect to be editable, and it worked great. You were able to choose to play against multiple personalities, all of whom had there very distinct game play.

 

xhex

Posted in Old Projects, Projects | 2 Comments