English
Source / code snippets

Fairste Spielfolge concerning "Wer must anfangen": Thue-Morse Algorithmus

 

p.specht

must two player alternately items a basket dial, and exists Einigkeit over The Wertigkeit this items, then will the first, player A, always immediate the best or. wertvollste thing from the basket take. This will with player B in the running the Time ungut strike, and it would like too as first begin. The Mathematiker Thue and Morse having itself consider, as Abfolge at Spielbeginn his must, so with several such play possible large Fairness arise. so enstand The Thue-Morse-follow, everybody can with the untenstehenden Progi produce can. tappt im dunkeln points, like The number Pi, a structure on, which never multiple repeatedly. interestingly is, that one tappt im dunkeln u.a. simply from binary-Paritäten produce can.
fountain: Youtube
Window Title "Thue-Morse Fairest Drawgame-follow erzeugen"
CLS:font 2:declare par&,w$,ThueMorse$
AppendMenuBar 100,"Eine Button = end + Result in Clipboard!"

Whileloop 0,2^31-1

    par&=WhoseTurn$(&Loop)'= Binärtest on 32bit-Parity Odd
    w$=if(par&,"B ","A ")
    ThueMorse$=ThueMorse$+st$(par&)
    print w$;
    putclip w$
    waitinput 7
    case &Loop<20:waitinput 200
    case %key:break

endwhile

clearclip:putclip ThueMorse$
print "\n\n Fairste Wahlabfolge in Clipboard! (player A = 0, B = 1)"
beep:Waitinput 4444
End

Proc WhoseTurn$ :parameters v&:v&=v&-((v&>>1) & $55555555)

    v&=(v& & $33333333)+((v&>>2) & $33333333)
    Return int((((v&+(v&>>4) & $F0F0F0F)*$1010101)>>24) mod 2)

Endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/29/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.330 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie