Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser
Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])
<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]
----
Also see [[AdvancedOptions]]
*[[Astronomie|./Astronomie/avi2bmp.html]]
**[[Mars|./Astronomie/avi2bmp.html#mars]]
**[[Jupiter|./Astronomie/avi2bmp.html#jupiter]]
**[[Saturn|./Astronomie/avi2bmp.html#saturn]]
*[[Bildverarbeitung]]
**[[Mars]]
**[[Jupiter]]
**[[Saturn]]
**[[Kantenerkennung ]]
<script>
return (new Date()).toString();
</script>
;PicooZ (short int (int16) GA)
PicooZ ist ein kleiner faszinierender in-door Spielzeughubschrauber der via Infrarotfernbedienung gesteuert wird. Einige (z.B [[Hunz Geekheim|http://hunz.geekheim.de/?p=49#more-49]] (Link ist heute nicht mehr da)) sind auf die Idee gekommen ihn vom Computer aus zu bedienen. Dazu müssen sie das Kommunikatiosprotokoll (13 Bit) zwischen der Infrarotfernbedienung und dem Hubschrauber analysieren, verstehen und dann nachbilden. Das gelingt soweit, allerdings, die letzten beiden Bits des Protokolls bilden eine Checksumme. Das Problem ist, wie wird diese aus den anderen Bits gebildet?
Alle Orginaldaten, so wie ich sie für mein genetisches Programm verwendet habe, fand man mal [[hier|http://hunz.org/heli/]]. Hier ein einzelnes Beispiel aus den Orginaldaten:
{{{
Ad|Up |Trim|L/R|Ck
--+----+----+---+--
.#|...#|....|...|.#
}}}
Ich habe sie alle gesammelt, doppelte Einträge eliminiert und sie in der folgenden zweispaltigen Tabelle zusammen gefasst. In der ersten Spalte val befinden sich die 13 Bit Protokolldaten (Ad|Up|Trim|L/R) ohne Checksumme in der zweiten Spalte cksum befindet sich der jeweils gemessene Checksummenanteil. Aus dem obigen Beispiel ergibt sich:
val=2176
cksum=1
{{{
val cksum
2176 1
2433 1
2816 0
3207 3
3461 1
2432 0
2049 2
2438 2
3077 2
3845 1
3841 0
2435 2
2051 0
2181 1
3717 3
3713 2
2560 1
3075 1
2055 1
2053 3
2944 3
3840 1
3960 0
2936 1
2048 3
2696 0
2952 1
3072 2
2824 3
2688 2
2808 3
3064 2
3192 3
3320 1
3448 2
3576 0
2552 1
2680 0
2937 0
2938 2
2939 3
3197 3
3453 2
3325 1
3199 1
3200 0
3080 0
2831 1
2574 1
3085 0
0 0
120 1
504 3
1016 1
1400 1
760 0
888 3
896 0
1032 2
1528 2
1416 1
1672 3
1792 3
1664 0
1024 1
512 3
256 1
128 3
1149 0
1407 2
1405 1
1151 3
1293 3
1677 3
1538 0
1673 2
1544 0
1167 3
640 1
632 2
376 0
510 0
1277 3
1152 2
4096 1
4352 0
4480 3
4992 1
5120 0
5248 3
5504 2
5760 1
5766 3
5254 0
4487 1
4103 2
4101 1
4486 0
5253 3
5893 2
5894 1
5888 2
5890 0
5891 1
4608 2
5382 3
5376 1
5240 1
4984 2
5368 2
5624 3
4856 1
6008 3
5752 2
5880 0
4872 1
4104 2
4232 0
5128 3
5768 2
5896 0
5773 2
5645 1
5757 2
5496 0
5245 1
4989 2
4861 1
4736 0
4864 3
4751 1
5261 1
5901 0
5640 1
}}}
Hier eine Lösung (in die Programmiersprache C übertragen) die mein Programm gefunden hat:
{{{
int cksum(int val) {
int a=(((11002^val)-val)/5) & 1;
int b=((((17186^val)-2*a)/5)^val^1) & 1;
return 2*a + b;
}
}}}
Also, eigentlich gefunden hat mein Programm die folgenden 100 Bytes:
{{{
short int (int16)
raw genotype
fb 81 fa fb 81 fb e7 85 9a f1 c8 fe fb 81 fa e2 c8 fe fb 81
fa c5 c8 fe 95 f1 fd f6 f4 9a fd c6 c2 e7 85 9a fa f4 9a c4
c8 fe ee 81 fa fa f4 9a f1 c8 fe fb 81 fb c2 17 aa fa f4 c1
fb 81 d1 51 cc f6 e2 7a b5 3d 4d 3c 5c f9 d1 da 31 81 8f 84
16 c3 27 d1 5c 7a d1 fd c6 b5 4d c1 84 4d 3f ea eb 84 16 f1
}}}
Diese werden von der GaVM interpretiert als:
{{{
//transformed to structured program without gotos
k++;
f++;
k++;
k++;
k++;
k++;
a=11002;
a^=val;
a-=val;
a=mydiv(a, k);
a&=f;
n=a;
a+=n;
m=a;
a-=m;
a^=val;
a^=k;
val=a;
a=17191;
a^=val;
a-=m;
a=mydiv(a, k);
a^=val;
a&=f;
a+=n;
a+=n;
chsum=a;
break;
}}}
Es macht auch den automatischen Versuch dies in einer einzigen Formel auszudrücken:
{{{
chsum= (1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (((5) ^ ((val) ^ ((1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5))-((1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5)))))) ^ (mydiv(((5) ^ ((val) ^ ((1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5))-((1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5)))))) ^ (17191)-((1) & (mydiv((val) ^ (11002)-(val), 5))+(1) & (mydiv((val) ^ (11002)-(val), 5))), 5)));
}}}
Man wird das Programm aber immer noch händig verschönern können, so wie ich das oben getan habe.
So, jetzt aber viel Glück bei der Suche nach einer Alternative. Ein Lauf braucht auf meinem Rechner ca. 30 Std. und nur ein Lauf von ca. 20 Läufen ist erfolgreich.
;Copy the complete data table (see above) in the input screen and press the "start GA" button (lower left) to start the genetic process. <html>
<applet archive="./code/ga2.jar" code="gp.base.GaGUI.class" width="980" height="570" HSPACE = "10" >
<param name="name" value="PicooZChsum">
<blockquote>
<p><em>Your browser can't run Java applets, so here's a picture of the window the program brings up:</em> </p>
<p><img src="./code/applet.gif" align=bottom width=506 height=420></p>
</blockquote>
</applet>
</html>
!Technical Information
;Getting the Source
The Java source files and class files for the applet is [[here|./code/ga2.jar]]. The individual files are packed together and compressed in a JAR archive. To unpack, rename to *.ZIP and use an unzip program that can handle long filenames.
;Using the code as a standalone Java application
If you would like you can copy the code to your computer so that you can use it as a standalone Java application. In this case, you need a Java virtual machine (JVM), such as Sun's java and proceed as follows:
#On your computer, create a new directory (or "folder", as some people say).
#Have your browser download the JAR file for the applet into that directory.
#To run, enter the following command:
**for java from the [[Sun JDK:|http://www.javasoft.com/java.sun.com/products/JDK/index.html]]
{{{
java -jar ga2.jar name=PicooZChsum
}}}
The advantage: You may resize the application window at your discretion and the layout adjusts.
!Technobabble
The applet was compiled with Sun java 1.4.2 and tested with [[Microsoft Internet Explorer 9.0|http://www.microsoft.com/ie]]. Please report any trouble that you experience to me.
;1 Bilder von Gattaca10
Bilder vom Einsatz bei der Robot Challenge 2010 in Wien.
<html>
<td><a href="./roboter/gattaca9/gattaca10.1.JPG"><img width="330" height="220" src="./roboter/gattaca9/gattaca10.1.JPG"></a></td>
<td><a href="./roboter/gattaca9/gattaca10.2.JPG"><img width="330" height="220" src="./roboter/gattaca9/gattaca10.2.JPG"></a></td>
</html>
;2 Videos von Gattaca10
Videos vom Einsatz bei der Robot Challenge 2010 in Wien.
Links die, während des Wettkampfes gesammelten und erst später offline visualisierten, Log-Daten. Rechts ist das Live-Video zu sehen.
<html>
<object width="853" height="505"><param name="movie" value="http://www.youtube.com/v/-CyXC7mEnnY&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-CyXC7mEnnY&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="853" height="505"></embed></object>
</html>
;3 Schematischer Aufbau von Gattaca10
<html>
<script type="text/javascript">
tooltip = null;
document.onmousemove = updateTooltip;
function updateTooltip(e) {
try {
if (document.all) {
if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
x = document.documentElement.scrollLeft + window.event.x;
y = document.documentElement.scrollTop + window.event.y;
}
else { // all other Explorers
x = document.body.scrollLeft + window.event.x;
y = document.body.scrollTop + window.event.y;
}
}
else {
x = e.pageX;
y = e.pageY;
}
if (tooltip != null) {
o = 20;
var sx, sy;
if (self.pageYOffset) { // all except Explorer
sx = self.pageXOffset;
sy = self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
sx = document.documentElement.scrollLeft;
sy = document.documentElement.scrollTop;
}
else if (document.body) { // all other Explorers
sx = document.body.scrollLeft;
sy = document.body.scrollTop;
}
t = y + o + tooltip.offsetHeight;
w = sy + document.body.clientHeight;
if (t > w) {
y = y - o - tooltip.offsetHeight;
}
else {
y = y + o;
}
t = x + o + tooltip.offsetWidth;
w = sx + document.body.clientWidth;
if (t > w) {
x = x - o - tooltip.offsetWidth;
}
else {
x = x + o;
}
tooltip.style.left = x + "px";
tooltip.style.top = y + "px";
}
} catch (error) { error = null; }
}
function showTooltip(id) {
try {
tooltip = document.getElementById(id);
tooltip.style.display = "block";
} catch (error) { error = null; }
}
function hideTooltip() {
try {
tooltip.style.display = "none";
} catch (error) { error = null; }
}
</script>
<div class="tooltip" id="n0">CrossTiger in action</div>
<div class="tooltip" id="n1">Netbook</div>
<div class="tooltip" id="n2"><br><br><br><br><br><br>Arduino Duemilanove</div>
<div class="tooltip" id="n3">4 IR Abstand</div>
<div class="tooltip" id="n4">1 input Diode</div>
<div class="tooltip" id="n5">4 Microschalter</div>
<div class="tooltip" id="n6">2 Quad Coder</div>
<div class="tooltip" id="n7">WEB CAM</div>
<div class="tooltip" id="n16">A in 5</div>
<div class="tooltip" id="n17">A in 1<br>A in 2<br>A in 3<br>A in 4</div>
<div class="tooltip" id="n18">PWMa (3)<br></div>
<div class="tooltip" id="n19">D in (6)<br>D in (7)<br>D in (8)<br>D in (9)<br></div>
<div class="tooltip" id="n20">D in (10)<br>D in (11)<br>D in (12)<br>D in (13)<br></div>
<div class="tooltip" id="n22">USB</div>
<div class="tooltip" id="n23">USB</div>
<div class="tooltip" id="n24">USB</div>
<div class="tooltip" id="n25">CrossTiger 231068 von Conrad</div>
<div class="tooltip" id="n26">Servo Lenkung</div>
<div class="tooltip" id="n27">Motor Treiber</div>
<div class="tooltip" id="n31">PWMb (5)</div>
<div class="tooltip" id="n32">D in (0)<br>D in (1)<br></div>
<div class="tooltip" id="n33">D in (2)<br>D in (4)</div>
<div class="tooltip" id="n34">Empfänger<br><br>Channel 1<br>Channel 2</div>
<div class="tooltip" id="n37">CrossTiger</div>
<div class="tooltip" id="n38">Memsic MXD2020ML</div>
<div class="tooltip" id="n43">A in 0 (Temperatur)</div>
<map name="image1_1">
<area shape="rect" coords="342,1016,469,1049" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n43')"/>
<area shape="rect" coords="15,962,225,1051" href="http://www.farnell.com/datasheets/75136.pdf" alt="" target="_blank" onmouseout="hideTooltip()" onmouseover="showTooltip('n38')"/>
<area shape="rect" coords="650,516,903,580" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n37')"/>
<area shape="rect" coords="659,897,880,986" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n34')"/>
<area shape="rect" coords="435,910,506,973" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n33')"/>
<area shape="rect" coords="339,964,420,997" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n32')"/>
<area shape="rect" coords="434,744,512,784" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n31')"/>
<area shape="rect" coords="657,713,882,806" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n27')"/>
<area shape="rect" coords="659,596,880,689" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n26')"/>
<area shape="rect" coords="117,15,743,121" href="http://www.cxtreme.de/computer/reely_monstertruck_crosstigerrtr.sap" alt="" target="_blank" onmouseout="hideTooltip()" onmouseover="showTooltip('n25')"/>
<area shape="rect" coords="295,256,345,279" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n24')"/>
<area shape="rect" coords="399,447,449,470" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n23')"/>
<area shape="rect" coords="398,334,448,356" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n22')"/>
<area shape="rect" coords="341,837,418,917" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n20')"/>
<area shape="rect" coords="341,720,418,800" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n19')"/>
<area shape="rect" coords="433,624,510,662" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n18')"/>
<area shape="rect" coords="338,483,395,542" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n17')"/>
<area shape="rect" coords="340,615,393,644" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n16')"/>
<area shape="rect" coords="34,215,153,316" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n7')"/>
<area shape="rect" coords="15,832,225,921" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n6')"/>
<area shape="rect" coords="16,715,223,804" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n5')"/>
<area shape="rect" coords="18,585,221,674" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n4')"/>
<area shape="rect" coords="20,468,220,557" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n3')"/>
<area shape="rect" coords="282,435,555,1110" href="http://arduino.cc/en/Main/ArduinoBoardDuemilanove" alt="" target="_blank" onmouseout="hideTooltip()" onmouseover="showTooltip('n2')"/>
<area shape="rect" coords="282,169,555,363" alt="" onmouseout="hideTooltip()" onmouseover="showTooltip('n1')"/>
<area shape="rect" coords="631,507,914,1037" href="http://www.youtube.com/watch?v=14kyJQQUS-U" alt="" target="_blank" onmouseout="hideTooltip()" onmouseover="showTooltip('n0')"/>
</map>
<table class="yimagetable" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img class="yimage" src="./roboter/gattaca9/GATTACA91_1.png" usemap="#image1_1" border="0" alt=""/></td>
</tr>
</table>
</html>
;4 Bilder aus der Aufbauphase
Als Quadcoder wird eine Maus zweckentfremdet.
<html>
<tr>
<td><a href="./roboter/gattaca9/05062009(002).jpg"><img width="330" height="220" src="./roboter/gattaca9/05062009(002).jpg"></a></td>
<td><a href="./roboter/gattaca9/05062009(006).jpg"><img width="330" height="220" src="./roboter/gattaca9/05062009(006).jpg"></a></td>
</tr>
<tr>
<td><a href="./roboter/gattaca9/05062009(005).jpg"><img width="330" height="220" src="./roboter/gattaca9/05062009(005).jpg"></a></td>
</tr>
</html>
Blick auf die beiden IR Distanzsensoren (GP2Y0A02YK).
<html><img width="680" height="470" src="./roboter/gattaca9/IMG_0150.jpg"></html>
;5 Videos aus der Testphase
Test der beiden IR Distanzsensoren (GP2Y0A02YK).
<html>
<object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/FyyNYDcygsI&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FyyNYDcygsI&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object>
</html>
Test des Basisverhaltens in unserer Testarena.
<html>
<object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/S5yqXm-VkI0&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/S5yqXm-VkI0&hl=de_DE&fs=1&color1=0x402061&color2=0x9461ca" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object>
</html>
Die VM des GA ist eine 16 Registermaschine mit 256 ~Op-Codes. Abhängig von der Konfiguration sind alle Register (R) entweder vom Typ ''short'' (''int16'') oder ''int'' (''int32'') oder ''double''. Die Registernamen haben Aliase wenn die gesuchte Funktion mehr als einen Input Parameter benötigt.@@font-size: 9pt;line-height:9pt;
|!No|!Register|!Alias|!Comment|
| 0 | a || Akku |
| 1 | x | x1 ||
| 2 | c | x2 ||
| 3 | d | x3 ||
| 4 | e | x4 ||
| 5 | f | x5 ||
| 6 | g | x6 ||
| 7 | h | x7 ||
| 8 | i | x8 ||
| 9 | j | x9 ||
| a | k | x10 ||
| b | l | x11 ||
| c | m | x12 ||
| d | n | x13 ||
| e | o | x14 ||
| f | y || Result |
@@
Die 256 ~Op-Codes der VM:@@font-size: 9pt;line-height:9pt;
|!Byte Code|!Semantic|!Comment|
| 00 |break;||
|>| !a|=R | !or |
| 01 |a|=x;||
| 02 |a|=c;||
| 03 |a|=d;||
| 04 |a|=e;||
| 05 |a|=f;||
| 06 |a|=g;||
| 07 |a|=h;||
| 08 |a|=i;||
| 09 |a|=j;||
| 0a |a|=k;||
| 0b |a|=l;||
| 0c |a|=m;||
| 0d |a|=n;||
| 0e |a|=o;||
| 0f |a|=y;||
|>| !a=inlineConstant | !assign |
| 10 |a=~InlineUShort;||
| 11 |a=~InlineUShort;||
| 12 |a=~InlineUShort;||
| 13 |a=~InlineUShort;||
| 14 |a=~InlineUShort;||
| 15 |a=~InlineUShort;||
| 16 |a=~InlineUShort;||
| 17 |a=~InlineUShort;||
| 18 |a=~InlineByte;||
| 19 |a=~InlineByte;||
| 1a |a=~InlineByte;||
| 1b |a=~InlineByte;||
| 1c |a=~InlineByte;||
| 1d |a=~InlineByte;||
| 1e |a=~InlineByte;||
| 1f |a=~InlineByte;||
|>| !a=R | !assign |
| 20 |a=a;| Noop |
| 21 |a=x;||
| 22 |a=c;||
| 23 |a=d;||
| 24 |a=e;||
| 25 |a=f;||
| 26 |a=g;||
| 27 |a=h;||
| 28 |a=i;||
| 29 |a=j;||
| 2a |a=k;||
| 2b |a=l;||
| 2c |a=m;||
| 2d |a=n;||
| 2e |a=o;||
| 2f |a=y;||
|>| !R=a | !assign |
| 30 |a=a;| Noop |
| 31 |x=a;||
| 32 |c=a;||
| 33 |d=a;||
| 34 |e=a;||
| 35 |f=a;||
| 36 |g=a;||
| 37 |h=a;||
| 38 |i=a;||
| 39 |j=a;||
| 3a |k=a;||
| 3b |l=a;||
| 3c |m=a;||
| 3d |n=a;||
| 3e |o=a;||
| 3f |y=a;||
|>| !a+=R | !add |
| 40 |a+=a;| a=2*a |
| 41 |a+=x;||
| 42 |a+=c;||
| 43 |a+=d;||
| 44 |a+=e;||
| 45 |a+=f;||
| 46 |a+=g;||
| 47 |a+=h;||
| 48 |a+=i;||
| 49 |a+=j;||
| 4a |a+=k;||
| 4b |a+=l;||
| 4c |a+=m;||
| 4d |a+=n;||
| 4e |a+=o;||
| 4f |a+=y;||
|>| !a−=R | !subtract |
| 50 |a−=a;| a=0 |
| 51 |a−=x;||
| 52 |a−=c;||
| 53 |a−=d;||
| 54 |a−=e;||
| 55 |a−=f;||
| 56 |a−=g;||
| 57 |a−=h;||
| 58 |a−=i;||
| 59 |a−=j;||
| 5a |a−=k;||
| 5b |a−=l;||
| 5c |a−=m;||
| 5d |a−=n;||
| 5e |a−=o;||
| 5f |a−=y;||
|>| !a*=R | !multiply |
| 60 |a*=a;||
| 61 |a*=x;||
| 62 |a*=c;||
| 63 |a*=d;||
| 64 |a*=e;||
| 65 |a*=f;||
| 66 |a*=g;||
| 67 |a*=h;||
| 68 |a*=i;||
| 69 |a*=j;||
| 6a |a*=k;||
| 6b |a*=l;||
| 6c |a*=m;||
| 6d |a*=n;||
| 6e |a*=o;||
| 6f |a*=y;||
|>| !a/=R | !divide |
| 70 |a=mydiv(a, a);| MoreDetails |
| 71 |a=mydiv(a, x);||
| 72 |a=mydiv(a, c);||
| 73 |a=mydiv(a, d);||
| 74 |a=mydiv(a, e);||
| 75 |a=mydiv(a, f);||
| 76 |a=mydiv(a, g);||
| 77 |a=mydiv(a, h);||
| 78 |a=mydiv(a, i);||
| 79 |a=mydiv(a, j);||
| 7a |a=mydiv(a, k);||
| 7b |a=mydiv(a, l);||
| 7c |a=mydiv(a, m);||
| 7d |a=mydiv(a, n);||
| 7e |a=mydiv(a, o);||
| 7f |a=mydiv(a, y);||
|>| !if(a>0) goto Lx | !conditional jump<br/>Implementation in C |
| 80 |jg(L0);|#define jg(Lx) if(a>0) goto Lx|
| 81 |jg(L1);||
| 82 |jg(L2);||
| 83 |jg(L3);||
| 84 |jg(L4);||
| 85 |jg(L5);||
| 86 |jg(L6);||
| 87 |jg(L7);||
|>| !Label(Lx): | !Target of goto Lx |
| 88 |Label(L0):|#define Label(Lx) Lx|
| 89 |Label(L1):||
| 8a |Label(L2):||
| 8b |Label(L3):||
| 8c |Label(L4):||
| 8d |Label(L5):||
| 8e |Label(L6):||
| 8f |Label(L7):||
|>| !R++ | !increment |
| 90 |a++;||
| 91 |x++;||
| 92 |c++;||
| 93 |d++;||
| 94 |e++;||
| 95 |f++;||
| 96 |g++;||
| 97 |h++;||
| 98 |i++;||
| 99 |j++;||
| 9a |k++;||
| 9b |l++;||
| 9c |m++;||
| 9d |n++;||
| 9e |o++;||
| 9f |y++;||
|>| !R−− | !decrement |
| a0 |a−−;||
| a1 |x−−;||
| a2 |c−−;||
| a3 |d−−;||
| a4 |e−−;||
| a5 |f−−;||
| a6 |g−−;||
| a7 |h−−;||
| a8 |i−−;||
| a9 |j−−;||
| aa |k−−;||
| ab |l−−;||
| ac |m−−;||
| ad |n−−;||
| ae |o−−;||
| af |y−−;||
|>| !a&=R | !and |
| b0 |a&=a;| Noop |
| b1 |a&=x;||
| b2 |a&=c;||
| b3 |a&=d;||
| b4 |a&=e;||
| b5 |a&=f;||
| b6 |a&=g;||
| b7 |a&=h;||
| b8 |a&=i;||
| b9 |a&=j;||
| ba |a&=k;||
| bb |a&=l;||
| bc |a&=m;||
| bd |a&=n;||
| be |a&=o;||
| bf |a&=y;||
|>| !a=sign(R) | !sign of R |
| c0 |a=sign(a);| MoreDetails |
| c1 |a=sign(x);||
| c2 |a=sign(c);||
| c3 |a=sign(d);||
| c4 |a=sign(e);||
| c5 |a=sign(f);||
| c6 |a=sign(g);||
| c7 |a=sign(h);||
| c8 |a=sign(i);||
| c9 |a=sign(j);||
| ca |a=sign(k);||
| cb |a=sign(l);||
| cc |a=sign(m);||
| cd |a=sign(n);||
| ce |a=sign(o);||
| cf |a=sign(y);||
|>| !a^=R | !xor |
| d0 |a^=a;| a=0 |
| d1 |a^=x;||
| d2 |a^=c;||
| d3 |a^=d;||
| d4 |a^=e;||
| d5 |a^=f;||
| d6 |a^=g;||
| d7 |a^=h;||
| d8 |a^=i;||
| d9 |a^=j;||
| da |a^=k;||
| db |a^=l;||
| dc |a^=m;||
| dd |a^=n;||
| de |a^=o;||
| df |a^=y;||
|>| !a%=R | !modulo |
| e0 |a=mymod(a, a);| MoreDetails |
| e1 |a=mymod(a, x);||
| e2 |a=mymod(a, c);||
| e3 |a=mymod(a, d);||
| e4 |a=mymod(a, e);||
| e5 |a=mymod(a, f);||
| e6 |a=mymod(a, g);||
| e7 |a=mymod(a, h);||
| e8 |a=mymod(a, i);||
| e9 |a=mymod(a, j);||
| ea |a=mymod(a, k);||
| eb |a=mymod(a, l);||
| ec |a=mymod(a, m);||
| ed |a=mymod(a, n);||
| ee |a=mymod(a, o);||
| ef |a=mymod(a, y);||
| !Noops |>|>|
| f0 |/*noop*/;||
| f1 |/*noop*/;||
| f2 |/*noop*/;||
| f3 |/*noop*/;||
| f4 |/*noop*/;||
| f5 |/*noop*/;||
| f6 |/*noop*/;||
| f7 |/*noop*/;||
| f8 |/*noop*/;||
| f9 |/*noop*/;||
| fa |/*noop*/;||
| fb |/*noop*/;||
| fc |/*noop*/;||
| fd |/*noop*/;||
| fe |/*noop*/;||
| ff |/*noop*/;||
@@
Beispiel aus [[Check Summe für PicooZ]].
{{{
short int (int16)
raw genotype
fb 81 fa fb 81 fb e7 85 9a f1 c8 fe fb 81 fa e2 c8 fe fb 81
fa c5 c8 fe 95 f1 fd f6 f4 9a fd c6 c2 e7 85 9a fa f4 9a c4
c8 fe ee 81 fa fa f4 9a f1 c8 fe fb 81 fb c2 17 aa fa f4 c1
fb 81 d1 51 cc f6 e2 7a b5 3d 4d 3c 5c f9 d1 da 31 81 8f 84
16 c3 27 d1 5c 7a d1 fd c6 b5 4d c1 84 4d 3f ea eb 84 16 f1
}}}
Bei diesem Lauf wurden Filter so eingestellt, das Jumps, sign und mymod wie noops behandelt werden sollen.@@font-size: 9pt;line-height:9pt;
|!Byte Code|!Semantic|!Filtered Result|!Comment|
| fb |/*noop*/;||
| 81 |jg(L1);||
| fa |/*noop*/;||
| fb |/*noop*/;||
| 81 |jg(L1);||
| fb |/*noop*/;||
| e7 |a=mymod(a, h);||
| 85 |jg(L5);||
| 9a |k++;|k++;|
| f1 |/*noop*/;||
| c8 |a=sign(i);||
| fe |/*noop*/;||
| fb |/*noop*/;||
| 81 |jg(L1);||
| fa |/*noop*/;||
| e2 |a=mymod(a, c);||
| c8 |a=sign(i);||
| fe |/*noop*/;||
| fb |/*noop*/;||
| 81 |jg(L1);||
| fa |/*noop*/;||
| c5 |a=sign(f);||
| c8 |a=sign(i);||
| fe |/*noop*/;||
| 95 |f++;|f++;|
| f1 |/*noop*/;||
| fd |/*noop*/;||
| f6 |/*noop*/;||
| f4 |/*noop*/;||
| 9a |k++;|k++;|
| fd |/*noop*/;||
| c6 |a=sign(g);||
| c2 |a=sign(c);||
| e7 |a=mymod(a, h);||
| 85 |jg(L5);||
| 9a |k++;|k++;|
| fa |/*noop*/;||
| f4 |/*noop*/;||
| 9a |k++;|k++;|
| c4 |a=sign(e);||
| c8 |a=sign(i);||
| fe |/*noop*/;||
| ee |a=mymod(a, o);||
| 81 |jg(L1);||
| fa |/*noop*/;||
| fa |/*noop*/;||
| f4 |/*noop*/;||
| 9a |k++;|k++;|
| f1 |/*noop*/;||
| c8 |a=sign(i);||
| fe |/*noop*/;||
| fb |/*noop*/;||
| 81 |jg(L1);||
| fb |/*noop*/;||
| c2 |a=sign(c);||
| 17 |a=~InlineUShort;|a=11002;|(0xaafa)&0x7fff|
| aa |k−−;|~|high byte|
| fa |/*noop*/;|~|low byte|
| f4 |/*noop*/;||
| c1 |a=sign(x);||
| fb |/*noop*/;||
| 81 |jg(L1);||
| d1 |a^=x;|a^=x;|
| 51 |a−=x;|a−=x;|
| cc |a=sign(m);||
| f6 |/*noop*/;||
| e2 |a=mymod(a, c);||
| 7a |a=mydiv(a, k);|a=mydiv(a, k);|
| b5 |a&=f;|a&=f;|
| 3d |n=a;|n=a;|
| 4d |a+=n;|a+=n;|
| 3c |m=a;|m=a;|
| 5c |a−=m;|a−=m;|
| f9 |/*noop*/;||
| d1 |a^=x;|a^=x;|
| da |a^=k;|a^=k;|
| 31 |x=a;|x=a;|
| 81 |jg(L1);||
| 8f |Label(L7):||
| 84 |jg(L4);||
| 16 |a=~InlineUShort;|a=17191;|(0xc327)&0x7fff|
| c3 |a=sign(d);|~|high byte|
| 27 |a=h;|~|low byte|
| d1 |a^=x;|a^=x;|
| 5c |a−=m;|a−=m;|
| 7a |a=mydiv(a, k);|a=mydiv(a, k);|
| d1 |a^=x;|a^=x;|
| fd |/*noop*/;||
| c6 |a=sign(g);||
| b5 |a&=f;|a&=f;|
| 4d |a+=n;|a+=n;|
| c1 |a=sign(x);||
| 84 |jg(L4);||
| 4d |a+=n;|a+=n;|
| 3f |y=a;|y=a;|
| ea |a=mymod(a, k);||
| eb |a=mymod(a, l);||
| 84 |jg(L4);||
| 16 |a=~InlineUShort;||noop because<br>low byte is missing|
| f1 |/*noop*/;|~|~|
@@
*[[Genetische Algorithmen (GA)]]
**[[Genetische Programme]]
***[[y=3*x^4 - 3*x + 1]]
***[[Linienverfolgung für ASURO]]
***[[Zufallszahlen]]
***[[Check Summe für PicooZ]]
**[[Neuronale Netze bei vorgegebener Topologie, Gewichtungen durch GA]]
***[[Das XOR Problem]]
***[[Kantenerkennung]]
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2010.12.15 1.9.6 allow (but ignore) type="..." syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 1.0.0 initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 6, date: new Date(2010,12,15)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: type=\\\"[^\\\"]*\\\")?(?: src=\\\"([^\\\"]*)\\\")?(?: label=\\\"([^\\\"]*)\\\")?(?: title=\\\"([^\\\"]*)\\\")?(?: key=\\\"([^\\\"]*)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // external script library
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // inline code
if (show) // display source in tiddler
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create 'onclick' command link
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run script immediately
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
try { var out=eval(c); }
catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
*[[Genetische Algorithmen (GA)]]
**[[Genetische Programme]]
***[[y=3*x^4 - 3*x + 1]]
***[[Linienverfolgung für ASURO]]
***[[Zufallszahlen]]
***[[Check Summe für PicooZ]]
**[[Neuronale Netze bei vorgegebener Topologie, Gewichtungen durch GA]]
***[[Das XOR Problem]]
***[[Kantenerkennung]]
*[[Neuronale Netze trainiert durch Backpropagation]]
**[[Das XOR Problem]]
**[[Kantenerkennung]]
*[[Roboter]]
**[[Algorithmen]]
***[[Maus Odometrie]]
**[[Vielfrass (2001)]]
**[[GATTACA1 (2002)]]
**[[GATTACA2 (2003)]]
**[[GATTACA3 (RoboChallenge 2004)]]
**[[GATTACA5 (RobotLiga 2005)]]
**[[ASURO]]
**[[GATTACA7 (für RoboTest 2007)]]
**[[finnisches Boot]]
**[[GATTACA8 (für RoboTest 2008)]]
**[[GATTACA9 (CrossTiger modding)]]
*[[Boerse]]
*[[Astronomie]]
**[[Mars]]
**[[Jupiter]]
**[[Saturn]]
*[[Bildverarbeitung]]
**[[Mars]]
**[[Jupiter]]
**[[Saturn]]
**[[Kantenerkennung]]
*[[Schach Programmierung]]
**[[Endspieldatenbanken mal anders]]
<html>
<script language="javascript" src="http://www.java.com/js/deployJava.js">
var attributes = { id:'noID', archive:'./code/ga1.jar', code:'GaGUI.class', width:980, height:570} ;
var parameters = {} ;
deployJava.runApplet(attributes, parameters, '1.6');
</script>
</html>
<script show>
return (new Date()).toString();
</script>
<script show>
return '<html><td><a href="./roboter/gattaca9/gattaca10.1.JPG"><img width="330" height="220" src="./roboter/gattaca9/gattaca10.1.JPG"></a></td> <td><a href="./roboter/gattaca9/gattaca10.2.JPG"><img width="330" height="220" src="./roboter/gattaca9/gattaca10.2.JPG"></a></td></html>'
</script>
;Ziel
Der Roboter [[ASURO|http://de.wikipedia.org/wiki/ASURO]] soll einer Line folgen (hier eine Kreisbahn). Das Herzstück des Programms soll aber nicht händig geschrieben werden sondern durch einen genetischen Algorithmus gefunden werden (genetische Programmierung GP).
<html><img width="240" height="190" src="./bilder/AsuroImKreis.jpeg"></html>
;Die Fitnessfunktion
Jeder evolvierte Robotcode wird für 5000ms durchsimuliert. Dabei führt der Roboter seine Aktion (''action'') für jeweils 50ms durch. Dann werden die Sensorwerte neu abgefragt und der Robotcode berechnet die neue Aktion. Für den Fitnesswert werden alle 50ms das Quadrat des Abstands zur Kreislinie aufsummiert. Zusätzlich addieren sich Strafpunkte wenn der Roboter seine jüngste Spur berührt (damit er nicht einfach auf dem einmal gefundenen Kreis stehen bleibt).
Man braucht schon etwas Geduld. Auf meinem Rechner 2 Stunden. Es kann auch schon mal etwas dauern (3 bis 15 min) bis es eine erste zündende "Idee" gibt. Fitnesswerte unter 80 sind gut. Fitnesswerte unter 60 sind sehr gut. Und Werte unter 50 sind ein wirklicher Glücksfall.
Hier ein evolviertes Codestück:
{{{
int computeGAaction(int inState, int sensor) {
// transformed to structured program without gotos
//inlined expression code
outState= (sensor) | ((inState) * (inState));
action= (((0) ^ ((sensor) | ((inState) * (inState)))-(sensor)) * ((0) ^((sensor) | ((inState) * (inState)))-(sensor))) * (((0) ^ ((sensor) |((inState) * (inState)))-(sensor)) * ((0) ^ ((sensor) | ((inState) *(inState)))-(sensor)))+((((0) ^ ((sensor) | ((inState) *(inState)))-(sensor)) * ((0) ^ ((sensor) | ((inState) *(inState)))-(sensor))) * (((0) ^ ((sensor) | ((inState) *(inState)))-(sensor)) * ((0) ^ ((sensor) | ((inState) *(inState)))-(sensor)))) | ((-(sensor)) * (-(sensor)));
return outState;
}
}}}
Die beiden Expressions rechts von
{{{
outState=...
action=...
}}}
sind der eigentliche evolvierte Codeteil.
''inState''
ist zu Anfang 0. Danach wird ihm immer der Wert von ''outState'' zugewiesen. Dadurch wird das Ganze zu einer einfachen state transition machine. "Einfach" so dachte ich, aber ich verstehe den evolvierten Code letztlich nicht. Aber - eingesetzt in den realen ASURO - löst dieses Stück Code die Aufgabe "Linienverfolgung" super robust! D.h. schlechte Lichtverhältnisse und unsaubere Kreislinien stören nicht. Das liegt - so meine ich - daran, dass bei der Simulation auf einem (immer wieder neu) verrauschten Kreis trainiert/evolviert wurde.
''sensor''
kann die Werte 0 bis 3 annehmen.
{{{
0: beide Dioden empfangen zu wenig Licht
1: rechte Diode empfängt Licht (über einem Schwellwert)
2: linke Dioden empfängt Licht (über einem Schwellwert)
3: beide Dioden empfangen Licht
}}}
''action''
Mit dem Wert von action wird Asuro gesteuert:
{{{
1: Asuro nach rechts
2: Asuro nach links
sonst: Asuro gerade aus
}}}
!Just press the "@@bgcolor:lightgreen; start GA @@" button to start the genetic process.
<html>
<applet archive="./code/FollowLineGA1.jar" code="gp.base.GaGUI.class" width="980" height="570">
<blockquote>
<p><em>Your browser can't run Java applets, so here's a picture of the window the program brings up:</em> </p>
<p><img src="applet.gif" align=bottom width=506 height=420></p>
</blockquote>
</applet>
</html>
;Erläuterung zu "watch best func(so far)":
Der verrauschte Testparcour wird angezeigt.
Jedes mal dann neu (und auch neu verrauscht) wenn der GA eine Verbesserung gefunden hat bzw. erneut auf diesen Button gewechselt wird. Von den 10 Startpositionen (grüne Dreiecke) wird eine zur Anzeige der Fahrt ausgewählt und die Position des Roboters alle 500ms gezeigt (blaue Dreiecke).
Der verrauschte Kreis hat einen Radius von 0,3 m.
!Technical Information
;Getting the Source
The Java source files and class files for the applet is [[here|code/FollowLineGA1.jar]]. The individual files are packed together and compressed in a JAR archive. To unpack, rename to *.ZIP and use an unzip program that can handle long filenames.
;And start
{{{
java -jar FollowLineGA1.jar
}}}
Infos about how that can be done are [[here|TechnoBabble]].
<html>
<div id="analog-clock" class="clock"></div>
</html>@@font-size:13pt;line-height:13pt;
[[Home|Willkommen]]
[[Genetische Algorithmen (GA)]]
[[Neuronale Netze trainiert durch Backpropagation]]
[[Roboter]]
[[Boerse]]
[[Astronomie]]
[[Bildverarbeitung]]
[[Schach Programmierung]]
@@
<script>
var G={
base:'http://<Computed Value>',
gecko:navigator.product=='Gecko',
ie6:(!!document.all && !(typeof window.XMLHttpRequest=='object')),
init:function(){for(var n in G)if(G[n].init)G[n].init()},
set:function(a,b){for(var o in b)a[o]=b[o];return a},
create:function(a,b,c,d){var o=(d||document).createElement(a);G.set(o,b);G.set(o.style,c);return o},
append:function(a,b,c,d){var o=b.tagName?b:G.create(b,c,d);a.appendChild(o);return o}
}
function $(a){return document.getElementById(a)}
function $$(a,b){return (b||document).getElementsByTagName(a)}
G.clock={
init:function(){var m=this,o=$('analog-clock');if(o)m.prepare(o)},
prepare:function(a){
var m=this,o=G.create('div',{className:'face'}),r=m.radius=a.offsetWidth/2
for(i=0;i<12;i++)G.append(o,'div',{innerHTML:'●'})
m.make('hh',0.5,o);m.make('mm',0.75,o);m.make('ss',0.9,o)
G.append(a,o);m.setHrs(o,r)
m.timer=setInterval(G.clock.tick,1000)
},
make:function(a,b,c){
var m=G.clock,n=Math.floor(m.radius*b),o=m[a]=[]
for(i=0;i<n;i++)o[i]=G.append(c,'div',{className:a})
},
setHrs:function(o,r){
var p,M=Math,P=M.PI,rp,n=r*0.9
;for(i=0;i<12;i++){
p=o.childNodes[i];rp=(i+1)*2*P/12-P/2
G.set(p.style,{top:r+M.sin(rp)*n-p.offsetHeight/2+'px',left:r+M.cos(rp)*n-p.offsetWidth/2+'px'})
}
},
tick:function(){
var m=G.clock,d=new Date,hh,mm,ss,f=m.update
try{
ss=d.getSeconds()+d.getMilliseconds()/1000
mm=d.getMinutes()+ss/60
hh=d.getHours()+mm/60
f(m.hh,hh%12,12);f(m.mm,mm,60);f(m.ss,ss,60)
}catch(e){alert('error');m.stop()}
},
update:function(a,b,c){
var M=Math,P=M.PI,rp=b*P*2/c-P/2,r=G.clock.radius
for(i=0;i<a.length;i++)G.set(a[i].style,{top:r+M.sin(rp)*i+'px',left:r+M.cos(rp)*i+'px'})
},
stop:function(){clearInterval(G.clock.timer)}
}
G.init();
</script>
!Aufgabe
Der Roboter stehe mit seinem Zentrum Z bei:
{{{
x0 // Einheit Meter
y0 // Einheit Meter
a0 // Winkel in Bogenmaß (0 == Roboter schaut nach Osten)
}}}
Der Roboter hat zwei Räder (Rug Warrior Prinzip) und stützt sich vorne auf eine Computer Maus. Diese Maus soll zur Positionsbestimmung (hier Odometrie) des Roboters genutzt werden. Die Maus soll (erst mal zum einfacheren rein Denken) präzise orthogonal zum Roboter angebracht sein. Für die folgenden Überlegungen ist das Zentrum Z des Roboters genau bei der Mauskugel.
[img[./roboter/algorithmen/b1.jpeg]]
;Beobachtung1:
Der Drehpunkt D so eines Roboters liegt (theoretisch) immer irgendwo auf der Geraden die durch die Achsen beider Räder geht!! (Vorausgesetzt, es gibt kein Driften.) Diese Gerade nenne ich im Folgenden g.
d ist der Abstand zwischen Z und der Geraden g.
[img[./roboter/algorithmen/b4.jpeg]]
Man ließt nach einer kleinen Zeit t1 (in der Hoffnung das darin die Bewegung des Roboters gleichförmig bleibt) die xMouseTicks und yMouseTicks aus. Man möchte mit dieser Information die neue Position
x1
y1
a1
des Roboters bestimmen.
Dazu habe ich vorher die Maus kalibriert und kenne die Faktoren fx und fy mit denen man die MausTicks auf Meter umrechnet. (Bei meiner Maus gilt ungefähr fx=1.0/36000 und fy=1.0/36000):
{{{
xt= fx* xMouseTicks; // x Komponente der zurückgelegten Strecke
yt= fy* yMouseTicks; // y Komponente der zurückgelegten Strecke
b= sqrt(xt*xt +yt*yt); // Zurückgelegten Strecke in Metern
}}}
[img[./roboter/algorithmen/b5.jpeg]]
Aus der Beobachtung1 wissen wir aber, dass jede Bewegung auf einem Kreisbogen(-stück) zurückgelegt wird (also eine Tangentialbewegung ist). Selbst die Geradeausfahrt biege ich hierbei zu einer Bewegung auf einem (sehr großen) Kreis um. Was mir noch fehlt ist ein Vektor z der von D nach Z zeigt um den Kreis und damit die Bewegung vollends bestimmen zu können. Diesen Vektor bestimme ich in zwei Schritten.
Erstens die Länge r (das ist der Radius des gesuchten Kreises):
Dazu nutze ich die Kongruenz der rechtwinkligen Dreiecke (xt, Z, yt) einerseits und (Z, M, D) andererseits. D.h. r und b sind proportional.
{{{
if (abs(xt)<0.00001)
r= 1000.0; // 1 km ist quasi Unendlich für meinen kleinen Roboter ;-)
else
r= (d/xt) *b;
}}}
Zweitens den absoluten Winkel des Punktes Z relativ zu D:
Zunächst bestimme ich den relativen Winkel gamma:
{{{
gamma= -atan2(yt, xt);
}}}
Um den absoluten Winkel im Raum zu erhalten addiere ich den Lagewinkel des Roboters:
{{{
a0+gamma
}}}
Damit habe ich den gesuchten Vektor z (d.h. der Punkt D wird auf (0, 0) abgebildet):
{{{
xd0= r*cos(a0+gamma);
yd0= r*sin(a0+gamma);
}}}
Durch b und r bin ich in der Lage den Winkel beta zu bestimmen den der Roboter auf dem Kreis zurücklegt.
{{{
beta= b/r;
}}}
Damit kann ich die Drehung (stellvertretend) am Vektor z durchführen.
{{{
xd1= xd0*cos(beta)-yd0*sin(beta);
yd1= xd0*sin(beta)+yd0*cos(beta);
}}}
Den Differenzvektor ((xd0,yd0), (xd1, yd1)) hänge ich an Z an und erhalte so die neue Position und Lage des Roboters:
{{{
x1= x0+(xd1-xd0);
y1= y0+(yd1-yd0);
a1= a0+beta;
}}}
So sind mydiv und mymod implementiert um bei eine Division durch 0 (doch noch) einen Wert zu liefern. (Der Atmega8 verhält sich z.B. so.)
{{{
int mydiv(int a, int b) {
if(b==0) return -1;
return a/b;
};
}}}
{{{
int mymod(int a, int b) {
if(a==0) return 0;
if(b==0) return a;
return a%b;
};
}}}
Implementierung von sign:
{{{
int sign(int a) {
if (a>0) return 1;
if (a<0) return -1;
return 0;
};
}}}
*[[Neuronale Netze trainiert durch Backpropagation]]
**[[Das XOR Problem]]
**[[Kantenerkennung ]]
http://de.wikipedia.org/wiki/Benutzer:Mkie/PicooZ
[img[http://www.pottier.de/resources/_wsb_510x286_Pano.jpg]]
*[[Roboter]]
**[[Algorithmen]]
***[[Maus Odometrie]]
**[[Vielfrass (2001)|./roboter/vielfrass/index.htm]]
**[[GATTACA1 (2002)]]
**[[GATTACA2 (2003)|./roboter/gattaca2/gattaca2.html]]
**[[GATTACA3 (RoboChallenge 2004)|./roboter/gattaca3/gattaca3.html]]
**[[GATTACA5 (RobotLiga 2005)|./roboter/gattaca5/gattaca5.html]]
**[[ASURO|./roboter/asuro/asuro.html]]
**[[GATTACA7 (für RoboTest 2007)|./roboter/gattaca7/gattaca7.html]]
**[[finnisches Boot|./roboter/finnischesBoot/finnischesBoot.html]]
**[[GATTACA8 (für RoboTest 2008)|./roboter/gattaca8/gattaca8.html]]
**[[GATTACA9 (CrossTiger modding)]]
**[[GATTACA10 (vormals GATTACA9)]]
*[[Schach Programmierung]]
**[[Endspieldatenbanken mal anders ]]
.headerShadow {position:relative; padding:2em 0em 0em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:2em 0em 1em 1em; left: 0px; top:0px;}
body {background: #f8f8f8;}
div.tiddler .title {font-size: 23pt;}
div.tiddler .subtitle {font-size: 7pt;}
div.viewer {font-size: 11pt;}
.viewer pre {font-size: 9pt; margin-right:0.5em;}
.viewer img {margin-left:0.5em;}
div.tiddler .viewer {
background-color: #f0f0f0;
}
div[tags~="xga"].tiddler .viewer {
background-color: #ccddff;
}
div[tags~="xrobot"].tiddler .viewer {
background-color: #9999cc;
}
div[tags~="welcome"].tiddler .viewer {
background-color: #f8f8f8;
}
.clock{position:relative;width:120px;height:120px;border:solid 0px #000}
.clock img{width:100%;height:100%}
.clock .face,.clock .face div{position:absolute;top:0;left:0}
.clock .face{font-family:'trebuchet ms';font-size:14px;color:#04b;}
.clock .hh{background:#000;width:3px;height:3px}
.clock .mm{background:#000;width:2px;height:2px}
.clock .ss{background:#f00;width:1px;height:1px}
#displayArea {background-color: #ffccff; }
#mainMenu {border: 1px solid #ffff88; }
#commandPanel {background-color: #880000; }
#tiddlerWillkommen .title {
background-color: #99aaee;
}
div.tiddler .title {
font-size: 28pt;
}
div.viewer {
font-size: 11pt;
}
div[tags~="ga"].tiddler .viewer {
background-color: #ccddff;
}
;Using the code as a standalone Java application
If you would like you can copy the code to your computer so that you can use it as a standalone Java application. In this case, you need a Java virtual machine (JVM), such as Sun's java and proceed as follows:
#On your computer, create a new directory (or "folder", as some people say).
#Have your browser download the JAR file for the applet into that directory.
#To run, enter the following command:
**for java from the [[Sun JDK:|http://www.javasoft.com/java.sun.com/products/JDK/index.html]]
The advantage: You may resize the application window at your discretion and the layout adjusts.
;Info
The applet was compiled with Sun java 1.4.2 and tested with [[Microsoft Internet Explorer 9.0|http://www.microsoft.com/ie]]. Please report any trouble that you experience to me.
[img[./roboter/vielfrass/bilder/1.jpg]]
[img[./email.JPG]]
Auch interessant, mit einer gerade zu philosophischen Dimension, ist der Versuch, für den Zufall eine Formel zu finden. Ich habe mal 150 Zufallszahlen generiert und sie in 30 Gruppen zu je 5 Zufallszahlen zerlegt. Aufgabe ist es, aus den ersten 4 Werten den fünften zu berechnen:
{{{
y=fooGA(x1, x2, x3, x4)
}}}
Der GA müht sich redlich und schafft Lösungen wenn man ihn z.B. nur mit 10 Zeilen füttert. Aber auch sonst (bei 11 und mehr Datenzeilen) ist es oft überraschend wie gut er sich einer Lösung nähert.
{{{
x1 x2 x3 x4 y
0.9348654248276042 0.6522031968415821 0.4324418697219117 0.6359276236377672 0.6955261017956917
0.9876648729472152 0.8523350410683841 0.9827686342960965 0.12598590321703051 0.0752022074442219
0.7097234159450452 0.7201878855730746 0.01616777283449189 0.9300058492969383 0.48868648642364065
0.3598739743302912 0.2973523134808326 0.7834507657192933 0.09926690862204846 0.5723140021506113
0.6125688503534394 0.6128475904908989 0.6025844474719179 0.052515465981275766 0.40282995776681096
0.39383224328696176 0.7665665001445593 0.979902511537800 0.46810206494981266 0.5247649785898438
0.02691146629993213 0.4226367028858319 0.41991311169752754 0.46333058707099417 0.9640324206802328
0.8305581770461165 0.3067553175225528 0.8626015528307879 0.8491130059220828 0.7111377103789072
0.9639495660810881 0.3971467437522834 0.16103874860684453 0.6892760292704387 0.3163954698020911
0.029337921126012412 0.23085099546582666 0.414481997236524 0.9456388811021115 0.68182714440388
0.33150291385889763 0.19790604437232673 0.7219466351380869 0.15423822930170494 0.5980796469184906
0.8369016082870638 0.19758600398546078 0.6504357610673814 0.13727826573566393 0.8162314049542833
0.7592642200689435 0.4673056056522876 0.5648249811552286 0.962731617938942 0.2456911746937046
0.23680081862214664 0.9956408318286283 0.6741920238542322 0.8504861348350353 0.6100778597396427
0.2039491768675733 0.0434052401770727 0.6511575843863692 0.4258673682333822 0.2691515474632039
0.5547841059439093 0.031642207292678415 0.21479495651031133 0.5281810236500962 0.5436408386139455
0.5988979570711088 0.35718729001830496 0.06617523877487752 0.2771674506121441 0.9333031066320665
0.33396914977910186 0.2946937791291423 0.34135210900526247 0.658121258404536 0.28857758103914144
0.3903376611663951 0.9995112476649859 0.8650503105451051 0.5523892887016033 0.49651154002779785
0.32581266566189293 0.8908808883373519 0.8769783248988144 0.6272016303969877 0.21111022578584449
0.804547759144694 0.8635904122520395 0.154025658019058 0.7886061328047397 0.7343654498028099
0.4835418025451037 0.6064437492159241 0.4333017200230853 0.3419971390633224 0.6428199292621214
0.26990200478754656 0.25189341187853076 0.33271366620999077 0.4599836562713949 0.7278129530559038
0.8987156292069578 0.8807575229889126 0.29853171510417076 0.06066092262555933 0.6285277713857129
0.24413411525782858 0.6232274845634166 0.8891517891027111 0.7283877329057473 0.6449108535803626
0.4344391320015297 0.8282105085215916 0.8585495569163317 0.6991118063167808 0.3753742789689781
0.20476215144554377 0.37626846548290227 0.29455452601194454 0.6041585350175265 0.08461486690144471
0.41659148831004 0.8354820528272454 0.1760277602651431 0.7523964685808221 0.36065754980980014
0.1996022526152036 0.9904742334531106 0.7933785526747781 0.3347257530302512 0.5861535552029096
0.4861076735325687 0.5492880458594223 0.6113787365352326 0.6278969367997661 0.1388078322285331
}}}
!Just press the "start GA" button to start the genetic process.
<html>
<applet archive="./code/ga2.jar" code="gp.base.GaGUI.class" width="980" height="570">
<param name="name" value="Regression">
<blockquote>
<p><em>Your browser can't run Java applets, so here's a picture of the window the program brings up:</em> </p>
<p><img src="./code/applet.gif" align=bottom width=506 height=420></p>
</blockquote>
</applet>
</html>
!Technical Information
;Using the code as a standalone Java application
If you would like you can copy the code to your computer so that you can use it as a standalone Java application. In this case, you need a Java virtual machine (JVM), such as Sun's java and proceed as follows:
#On your computer, create a new directory (or "folder", as some people say).
#Have your browser download the JAR file for the applet into that directory.
#To run, enter the following command:
**for java from the [[Sun JDK:|http://www.javasoft.com/java.sun.com/products/JDK/index.html]]
{{{
java ga1.jar
}}}
The advantage: You may resize the application window at your discretion and the layout adjusts.
!Technobabble
The applet was compiled with Sun java 1.4.2 and tested with [[Microsoft Internet Explorer 9.0|http://www.microsoft.com/ie]]. Please report any trouble that you experience to me.
!Just press the "@@bgcolor:lightgreen; start GA @@" button to start the genetic process.
<html>
<applet archive="./code/ga1.jar" code="GaGUI.class" width="980" height="570">
<blockquote>
<p><em>Your browser can't run Java applets, so here's a picture of the window the program brings up:</em> </p>
<p><img src="./code/applet.gif" align=bottom width=506 height=420></p>
</blockquote>
</applet>
</html>
!Technical Information
;Using the code as a standalone Java application
If you would like you can copy the code to your computer so that you can use it as a standalone Java application. In this case, you need a Java virtual machine (JVM), such as Sun's java and proceed as follows:
#On your computer, create a new directory (or "folder", as some people say).
#Have your browser download the JAR file for the applet into that directory.
#To run, enter the following command:
**for java from the [[Sun JDK:|http://www.javasoft.com/java.sun.com/products/JDK/index.html]]
{{{
java ga1.jar
}}}
The advantage: You may resize the application window at your discretion and the layout adjusts.
!Technobabble
The applet was compiled with Sun java 1.4.2 and tested with [[Microsoft Internet Explorer 9.0|http://www.microsoft.com/ie]]. Please report any trouble that you experience to me.