S
Skybuck Flying
Heeeeellllooooooo,
Slashdot.org yes which I read brought something to my attention:
http://www.wolframscience.com/prizes/tm23/turingmachine.html
A minimalistic CPU !
I like minimalistic shit.
And especially ROBUST SHIT.
And it seems MEGA FUCKING ROBUST CONCEPT
So NATURALLY I HAD TO IMPLEMENT IT TO SEE IT IN ACTION.
Here is my quick and simple implementation to experiment and play with
Wolfram/Turing Like/Minimalistic machine
Nicely seperated into a re-usable module.
I'll also include a simple GUI.
Just add a string grid, and a panel with 2 buttons on it or so. And setup
the OnClicks properly.
The rest is down by the buttons... one initialize button and one step
button.
The gui example is also very simple man ! I haven't programmed a GUI in
ages... actually that's not true... but it feels like it.
Me been in "engine land" so lonnnnggg hahahahahaha, so I know a thing or two
about writing "engines"
And so here is the fricking engine baby ! with some comments and
"documentation" too for the clueless
What did kinda surprise me is that "they" call it a Wolfram 2-3 machine.
But in reality it's really a 2-3-2 machine. Because each transition also
needs a move specifier.
They say so on the website and it's also required and logical otherwise it
won't function properly.
So I am not sure what that's all about... Is 2-3 same as 2-3-2 ? Hmmm
Depends on your points of view me thinks
Ofcourse one could describe the last 2 simply as the action the machine must
take... go left or go right... that's all it can do
So I guess it's valid
// *** Begin of Module Code ***
unit Unit_TwolframMachine_version_002;
{
Skybuck's implementation of Wolfram's (Turing-like) Machine
Version 0.02 created on 25 october 2007 by Skybuck Flying
Debugged and working correctly it seems.
No usage example yet except for a simple debug/demonstration program.
I think I am gonna try and use this stuff for some AI in a game
and I can think of two ways I am gonna use this stuff:
Way 1:
"Creating random robust computer programs"
Way 2:
"Modifieing robust computer programs"
The robustness and the completeness of this machine (at least so they claim)
seems
very interesting.
I am not yet sure how I am gonna use it... that's what I am gonna find out
some day.
However I have other project which needs attention too..
But I just couldn't let this one slip by unnoticed or unprogrammed
Because it's way too cool !
And because I wanna see some nice and interesting Delphi
programs/applications
which use this stuff I am gonna share it with you the people of the
internet/usenet.
I know you a bunch of assholes and idiots.. LOL... but one never knows...
Somebody, somewhere on this planet might actually do something cooooooOOOOOL
with it
Yes and if not then IIIIII might do something cool with it !
For now it's going into the freezer because I have no time to play with it.
Or maybe I will play with it... I don't know yet.
BUT SHARE SHARE SHARE THIS BRAVE NEW WORLD LOL LOL
I like this minimilazotion shit !
Especially because it seems ROBUST MAN !!
What a tiny CPU ! LOVING IT !
Some documentation for the clueless how to use it:
Simply call initialize once.
Then simply call execute repeatedly to run a program/processor which uses
the embedded tape player/recorder.
Use the input/output fields of machine to understand what it did after each
run
If you need a bigger tape then simply change TwolframPosition to something
bigger
Good luck !
See example code for short little gui example it could be a console
example as well but I choose gui.
Actually I have both examples... but gui example almost the same
}
interface
type
// TwolframPosition = 1..10*1000*1000; // 1 to 10 million positions on tape
available for now
TwolframPosition = 1..100; // for now let's just use 100 for easy
displaying.
TwolframState = ( ws_prev, ws_next ); // up/down in picture
TwolframColor = ( wc_orange, wc_yellow, wc_white );
TwolframMove = ( wm_left, wm_right );
TwolframOutput = record
OutputState : TwolframState;
OutputColor : TwolframColor;
OutputMove : TwolframMove;
end;
TwolframTransition = array[TwolframState] of array[TwolframColor] of
TwolframOutput;
TwolframTape = array[TWolframPosition] of TwolframColor;
TwolframMachine = record
mInputState : TwolframState; // remembers last input state
mInputColor : TwolframColor; // remembers last input color
mInputPosition : TwolframPosition; // remembers last input position
mOutputState : TwolframState; // remembers last output state
mOutputColor : TwolframColor; // remembers last output color
mOutputPosition : TwolframPosition; // remembers last output position
mOutputMove : TwolframMove;
mState : TwolframState; // current state
mHead : TwolframPosition; // current head position
mTape : TwolframTape;
mProcessor : TwolframTransition;
procedure SetupProcessor;
procedure Initialize;
procedure Execute;
end;
implementation
procedure TwolframMachine.SetupProcessor;
begin
// state up
mProcessor[ws_prev][wc_orange].OutputState := ws_prev;
mProcessor[ws_prev][wc_orange].OutputColor := wc_yellow;
mProcessor[ws_prev][wc_orange].OutputMove := wm_left;
mProcessor[ws_prev][wc_yellow].OutputState := ws_prev;
mProcessor[ws_prev][wc_yellow].OutputColor := wc_orange;
mProcessor[ws_prev][wc_yellow].OutputMove := wm_left;
mProcessor[ws_prev][wc_white].OutputState := ws_next;
mProcessor[ws_prev][wc_white].OutputColor := wc_yellow;
mProcessor[ws_prev][wc_white].OutputMove := wm_right;
// state down
mProcessor[ws_next][wc_orange].OutputState := ws_prev;
mProcessor[ws_next][wc_orange].OutputColor := wc_white;
mProcessor[ws_next][wc_orange].OutputMove := wm_right;
mProcessor[ws_next][wc_yellow].OutputState := ws_next;
mProcessor[ws_next][wc_yellow].OutputColor := wc_orange;
mProcessor[ws_next][wc_yellow].OutputMove := wm_right;
mProcessor[ws_next][wc_white].OutputState := ws_prev;
mProcessor[ws_next][wc_white].OutputColor := wc_orange;
mProcessor[ws_next][wc_white].OutputMove := wm_left;
end;
procedure TwolframMachine.Initialize;
var
vPosition : TwolframPosition;
begin
SetupProcessor;
// position head at center of tape.
mHead := High(TwolframPosition) div 2;
// start state is prev
mState := ws_prev;
// clear tape
for vPosition := Low(TwolframPosition) to High(TwolframPosition) do
begin
mTape[vPosition] := wc_white;
end;
end;
procedure TwolframMachine.Execute;
begin
mInputPosition := mHead;
mInputColor := mTape[mHead];
mInputState := mState;
mOutputState := mProcessor[mState][mInputColor].OutputState;
mOutputColor := mProcessor[mState][mInputColor].OutputColor;
mOutputPosition := mHead;
mOutputMove := mProcessor[mState][mInputColor].OutputMove;
// update tape contents
mTape[mHead] := mOutputColor;
// update head position
case mOutputMove of
wm_left :
begin
mHead := Pred(mHead);
end;
wm_right :
begin
mHead := Succ(mHead);
end;
end;
// update state
mState := mOutputState;
end;
end.
// *** End of Module Code ***
// *** Begin of GUI Example ***
unit UnitGuiMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Grids;
type
TForm1 = class(TForm)
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
StringGridTape: TStringGrid;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
Unit_TwolframMachine_version_002;
var
WolframMachine : TwolframMachine;
Step : integer;
procedure TForm1.Button1Click(Sender: TObject);
begin
Step := 1;
WolframMachine.Initialize;
StringGridTape.ColCount := High(TwolframPosition) + 2;
StringGridTape.RowCount := 1000;
StringGridTape.DefaultColWidth := 16;
StringGridTape.DefaultRowHeight := 16;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
WolframMachine.Execute;
case WolframMachine.mOutputColor of
wc_orange :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'o';
end;
wc_yellow :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'y';
end;
wc_white :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'w';
end;
end;
Step := Step + 1;
end;
end.
// *** End of GUI Example ***
And as a bunch of motherfuckers says:
ENJOY !
But this time this stuff is really enjoyable ! hahahahaha LOL.
I am probably gonna use it for a game ai... and try and make the game
program the ai itself.
But maybe I first try a simple maze solver or so
Please let me know if you did something reallllly interesting with it IN
DELPHI !
skybuck 2000 at hotmail dot com
if you managed to do something interesting with it
I shall include asm too because those guys kinda used to programming
minimalistic shit lol.
EAT THAT !
And electronics too in case they wanna implement it in hardware LOL
hahahaha.
Yeah, me just showing off my programming skills too HAHAHAHAHAHAHAHA.
Bye,
Skybuck.
Slashdot.org yes which I read brought something to my attention:
http://www.wolframscience.com/prizes/tm23/turingmachine.html
A minimalistic CPU !
I like minimalistic shit.
And especially ROBUST SHIT.
And it seems MEGA FUCKING ROBUST CONCEPT
So NATURALLY I HAD TO IMPLEMENT IT TO SEE IT IN ACTION.
Here is my quick and simple implementation to experiment and play with
Wolfram/Turing Like/Minimalistic machine
Nicely seperated into a re-usable module.
I'll also include a simple GUI.
Just add a string grid, and a panel with 2 buttons on it or so. And setup
the OnClicks properly.
The rest is down by the buttons... one initialize button and one step
button.
The gui example is also very simple man ! I haven't programmed a GUI in
ages... actually that's not true... but it feels like it.
Me been in "engine land" so lonnnnggg hahahahahaha, so I know a thing or two
about writing "engines"
And so here is the fricking engine baby ! with some comments and
"documentation" too for the clueless
What did kinda surprise me is that "they" call it a Wolfram 2-3 machine.
But in reality it's really a 2-3-2 machine. Because each transition also
needs a move specifier.
They say so on the website and it's also required and logical otherwise it
won't function properly.
So I am not sure what that's all about... Is 2-3 same as 2-3-2 ? Hmmm
Depends on your points of view me thinks
Ofcourse one could describe the last 2 simply as the action the machine must
take... go left or go right... that's all it can do
So I guess it's valid
// *** Begin of Module Code ***
unit Unit_TwolframMachine_version_002;
{
Skybuck's implementation of Wolfram's (Turing-like) Machine
Version 0.02 created on 25 october 2007 by Skybuck Flying
Debugged and working correctly it seems.
No usage example yet except for a simple debug/demonstration program.
I think I am gonna try and use this stuff for some AI in a game
and I can think of two ways I am gonna use this stuff:
Way 1:
"Creating random robust computer programs"
Way 2:
"Modifieing robust computer programs"
The robustness and the completeness of this machine (at least so they claim)
seems
very interesting.
I am not yet sure how I am gonna use it... that's what I am gonna find out
some day.
However I have other project which needs attention too..
But I just couldn't let this one slip by unnoticed or unprogrammed
Because it's way too cool !
And because I wanna see some nice and interesting Delphi
programs/applications
which use this stuff I am gonna share it with you the people of the
internet/usenet.
I know you a bunch of assholes and idiots.. LOL... but one never knows...
Somebody, somewhere on this planet might actually do something cooooooOOOOOL
with it
Yes and if not then IIIIII might do something cool with it !
For now it's going into the freezer because I have no time to play with it.
Or maybe I will play with it... I don't know yet.
BUT SHARE SHARE SHARE THIS BRAVE NEW WORLD LOL LOL
I like this minimilazotion shit !
Especially because it seems ROBUST MAN !!
What a tiny CPU ! LOVING IT !
Some documentation for the clueless how to use it:
Simply call initialize once.
Then simply call execute repeatedly to run a program/processor which uses
the embedded tape player/recorder.
Use the input/output fields of machine to understand what it did after each
run
If you need a bigger tape then simply change TwolframPosition to something
bigger
Good luck !
See example code for short little gui example it could be a console
example as well but I choose gui.
Actually I have both examples... but gui example almost the same
}
interface
type
// TwolframPosition = 1..10*1000*1000; // 1 to 10 million positions on tape
available for now
TwolframPosition = 1..100; // for now let's just use 100 for easy
displaying.
TwolframState = ( ws_prev, ws_next ); // up/down in picture
TwolframColor = ( wc_orange, wc_yellow, wc_white );
TwolframMove = ( wm_left, wm_right );
TwolframOutput = record
OutputState : TwolframState;
OutputColor : TwolframColor;
OutputMove : TwolframMove;
end;
TwolframTransition = array[TwolframState] of array[TwolframColor] of
TwolframOutput;
TwolframTape = array[TWolframPosition] of TwolframColor;
TwolframMachine = record
mInputState : TwolframState; // remembers last input state
mInputColor : TwolframColor; // remembers last input color
mInputPosition : TwolframPosition; // remembers last input position
mOutputState : TwolframState; // remembers last output state
mOutputColor : TwolframColor; // remembers last output color
mOutputPosition : TwolframPosition; // remembers last output position
mOutputMove : TwolframMove;
mState : TwolframState; // current state
mHead : TwolframPosition; // current head position
mTape : TwolframTape;
mProcessor : TwolframTransition;
procedure SetupProcessor;
procedure Initialize;
procedure Execute;
end;
implementation
procedure TwolframMachine.SetupProcessor;
begin
// state up
mProcessor[ws_prev][wc_orange].OutputState := ws_prev;
mProcessor[ws_prev][wc_orange].OutputColor := wc_yellow;
mProcessor[ws_prev][wc_orange].OutputMove := wm_left;
mProcessor[ws_prev][wc_yellow].OutputState := ws_prev;
mProcessor[ws_prev][wc_yellow].OutputColor := wc_orange;
mProcessor[ws_prev][wc_yellow].OutputMove := wm_left;
mProcessor[ws_prev][wc_white].OutputState := ws_next;
mProcessor[ws_prev][wc_white].OutputColor := wc_yellow;
mProcessor[ws_prev][wc_white].OutputMove := wm_right;
// state down
mProcessor[ws_next][wc_orange].OutputState := ws_prev;
mProcessor[ws_next][wc_orange].OutputColor := wc_white;
mProcessor[ws_next][wc_orange].OutputMove := wm_right;
mProcessor[ws_next][wc_yellow].OutputState := ws_next;
mProcessor[ws_next][wc_yellow].OutputColor := wc_orange;
mProcessor[ws_next][wc_yellow].OutputMove := wm_right;
mProcessor[ws_next][wc_white].OutputState := ws_prev;
mProcessor[ws_next][wc_white].OutputColor := wc_orange;
mProcessor[ws_next][wc_white].OutputMove := wm_left;
end;
procedure TwolframMachine.Initialize;
var
vPosition : TwolframPosition;
begin
SetupProcessor;
// position head at center of tape.
mHead := High(TwolframPosition) div 2;
// start state is prev
mState := ws_prev;
// clear tape
for vPosition := Low(TwolframPosition) to High(TwolframPosition) do
begin
mTape[vPosition] := wc_white;
end;
end;
procedure TwolframMachine.Execute;
begin
mInputPosition := mHead;
mInputColor := mTape[mHead];
mInputState := mState;
mOutputState := mProcessor[mState][mInputColor].OutputState;
mOutputColor := mProcessor[mState][mInputColor].OutputColor;
mOutputPosition := mHead;
mOutputMove := mProcessor[mState][mInputColor].OutputMove;
// update tape contents
mTape[mHead] := mOutputColor;
// update head position
case mOutputMove of
wm_left :
begin
mHead := Pred(mHead);
end;
wm_right :
begin
mHead := Succ(mHead);
end;
end;
// update state
mState := mOutputState;
end;
end.
// *** End of Module Code ***
// *** Begin of GUI Example ***
unit UnitGuiMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Grids;
type
TForm1 = class(TForm)
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
StringGridTape: TStringGrid;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
Unit_TwolframMachine_version_002;
var
WolframMachine : TwolframMachine;
Step : integer;
procedure TForm1.Button1Click(Sender: TObject);
begin
Step := 1;
WolframMachine.Initialize;
StringGridTape.ColCount := High(TwolframPosition) + 2;
StringGridTape.RowCount := 1000;
StringGridTape.DefaultColWidth := 16;
StringGridTape.DefaultRowHeight := 16;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
WolframMachine.Execute;
case WolframMachine.mOutputColor of
wc_orange :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'o';
end;
wc_yellow :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'y';
end;
wc_white :
begin
StringGridTape.Cells[WolframMachine.mOutputPosition, Step] := 'w';
end;
end;
Step := Step + 1;
end;
end.
// *** End of GUI Example ***
And as a bunch of motherfuckers says:
ENJOY !
But this time this stuff is really enjoyable ! hahahahaha LOL.
I am probably gonna use it for a game ai... and try and make the game
program the ai itself.
But maybe I first try a simple maze solver or so
Please let me know if you did something reallllly interesting with it IN
DELPHI !
skybuck 2000 at hotmail dot com
if you managed to do something interesting with it
I shall include asm too because those guys kinda used to programming
minimalistic shit lol.
EAT THAT !
And electronics too in case they wanna implement it in hardware LOL
hahahaha.
Yeah, me just showing off my programming skills too HAHAHAHAHAHAHAHA.
Bye,
Skybuck.