Derniers sujets | » Numbers par Ver2guerre Dim 02 Avr 2023, 00:47
» Mort ? par godbod Dim 22 Aoû 2021, 12:23
» Network, essai 1 par godbod Dim 09 Juil 2017, 02:18
» GODBOD par godbod Sam 08 Juil 2017, 14:05
» mon humeur par Ver2guerre Sam 30 Juil 2016, 19:44
» [A voir] Programme de traduction original : WikiTranslate par AdRiWeB Lun 01 Fév 2016, 04:50
» Reprise ? par Emyl Jeu 14 Juin 2012, 21:17
» Euh, ah ? par Ver2guerre Dim 27 Mai 2012, 12:11
» Problème TI 89 Titanium non visible après mise à jour par abdoukid Mer 23 Mai 2012, 13:37
» Y'a quelqu'un ? par Ver2guerre Sam 21 Avr 2012, 23:10
|
Qui est en ligne ? | Il y a en tout 7 utilisateurs en ligne :: 0 Enregistré, 0 Invisible et 7 Invités Aucun Le record du nombre d'utilisateurs en ligne est de 367 le Dim 18 Oct 2009, 00:16 |
| | Auteur | Message |
---|
tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Poker Sam 10 Mai 2008, 19:37 | |
| Bon, d'abord, on dit bonjour au p'tit nouveau pliz ^^ Voici donc le code d'un jeu de Poker (début en tout cas) : - BASIC Code a écrit:
- :randInt(1,13)→A
:randInt(1,13)→B :randInt(1,13)→C :randInt(1,13)→D :randInt(1,13)→E :randInt(1,13)→F :randInt(1,13)→G :randInt(1,13)→H :randInt(1,13)→I :randInt(1,13)→J :randInt(1,13)→L :1000→P :1000→S :1000→T :1000→U :ClrHome :Output(2,1,A :Output(2,4,B :Output(4,8,I :Input "MISE:",M :ClrHome :Output(2,1,A :Output(2,4,B :Output(4,6,I :Output(8,1,"ARG RESTANT=" :Output(8,13,P-M -M→Q :Output(4,9,J :Input "MISE:",N :ClrHome :Output(2,1,A :Output(2,4,B :Output(4,6,I :Output(4,9,J :Output(8,1,"ARG RESTANT" :Output(8,13,Q-N :Q-N→R :Output(4,11,L :Input "MISE=",O :ClrHome :Output(2,1,A :Output(2,4,B :Output(4,6,I :Output(4,9,J :Output(4,12,L :Output(8,1,"ARG RESTANT" :Output(8,13,R-O :If C≥7 and J≥7 :S=M :If C<7 and J<7 :S=M :If C=J and J≥7 :S=(M*2) :If C=J and 4≤J<7 :S=M :If C=J and J<4:Goto 2 :If C≠J and C≤3:Goto 2 :If C≠J and C>3 :S=M :If D≥7 and J≥7 :S=M :If D<7 and J<7 :S=M :If D=J and J≥7 :S=(M*2) :If D=J and 4≤J<7 :S=M :If D=J and J<4:Goto 2 :If D≠J and D≤3:Goto 2 :If D≠J and D>3 :S=M :If E≥7 and J≥7 :S=M :If E<7 and J<7 :S=M :If E=J and J≥7 :S=(M*2) :If E=J and 4≤J<7 :S=M :If E=J and J<4:Goto 2 :If E≠J and E≤3:Goto 2 :If E≠J and E>3 :S=M :If F≥7 and J≥7 :S=M :If F<7 and J<7 :S=M :If F=J and J≥7 :S=(M*2) :If F=J and 4≤J<7 :S=M :If F=J and J<4:Goto 2 :If F≠J and F≤3:Goto 2 :If F≠J and F>3 :S=M :If G≥7 and J≥7 :S=M :If G<7 and J<7 :S=M :If G=J and J≥7 :S=(M*2) :If G=J and 4≤J<7 :S=M :If G=J and J<4:Goto 2 :If G≠J and G≤3:Goto 2 :If G≠J and G>3 :S=M :If H≥7 and J≥7 :S=M :If H<7 and J<7 :S=M :If H=J and J≥7 :S=(M*2) :If H=J and 4≤J<7 :S=M :If H=J and J<4:Goto 2 :If H≠J and H≤3:Goto 2 :If H≠J and H>3 :S=M Generated by SourceCoder, 2005 Cemetech Beaucoup d'optimisations à faire, n'est-ce pas ? ^^ Enfin, c'est normal, vous codiez aussi comme ça à vos débuts :p (moi aussi :p) Quelques données quand même ^^ A à H = cartes des joueurs (4 joueurs, 3 IA => 2 cartes par joueur) I, J, L = 3 premières cartes mises sur la table N = 4ème carte mise sur la table M = mise du 1er joueur P, S, T, U = argent de chaque joueur (et il a compris pour les =, c'est la 1ère version ça ^^)(en gras et souligné pour pas qu'un boulet fasse la remarque ) |
| | | Syfo Pokémophile
Nombre de messages : 1978 Age : 33 Localisation : IYA items :
Personalized field : 26 jetons Réputation : 8 Points : 6767 Date d'inscription : 09/08/2007
Profil TI: 80, 82, 83, 83+, 84+ TO: 2 945 [GAIN * 1.1] Spécialité: Basic z80
| Sujet: Re: Poker Sam 10 Mai 2008, 20:20 | |
| Salut BASIC Coder!
Quel est le but de l'arrivee de ce "gars"? |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Sam 10 Mai 2008, 20:26 | |
| nan il s'appelle pas basic coder, basic coder c'est le truc que j'ai utilisé pour mettre le code en forme, le membre il s'appelle iamglamorous |
| | | Syfo Pokémophile
Nombre de messages : 1978 Age : 33 Localisation : IYA items :
Personalized field : 26 jetons Réputation : 8 Points : 6767 Date d'inscription : 09/08/2007
Profil TI: 80, 82, 83, 83+, 84+ TO: 2 945 [GAIN * 1.1] Spécialité: Basic z80
| Sujet: Re: Poker Sam 10 Mai 2008, 20:27 | |
| Hum je croyais que c'etait une invention.
Il s'est enregistre? Pourquoi il ne vient pas presenter son code lui meme?
(on va pas le manger <- cette phrase me f'ra toujours marrer) |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Sam 10 Mai 2008, 20:44 | |
| hmm là c'est moi qui m'suis proposé ^^ mais bon, son 1er post ne va pas tarder ^^ |
| | | iamglamorous nouveau
Nombre de messages : 3 Age : 32 items : o Personalized field : Réputation : 0 Points : 5841 Date d'inscription : 10/05/2008
| Sujet: Re: Poker Sam 10 Mai 2008, 20:52 | |
| voila, c'est moi qui est créer le programme. En fait, comme je ne connait pas très bien le forum, tama c'est proposé. sinon vous avez des idées pour l'améliorer? |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Sam 10 Mai 2008, 21:06 | |
| bah c'est simple, tu postes tout simplement ^^ - Citation :
:If C≥7 and J≥7 :S=M :If C<7 and J<7 :S=M :If C=J and J≥7 :S=(M*2) :If C=J and 4≤J<7 :S=M :If C=J and J<4:Goto 2 :If C≠J and C≤3:Goto 2 :If C≠J and C>3 :S=M :If D≥7 and J≥7 :S=M :If D<7 and J<7 :S=M :If D=J and J≥7 :S=(M*2) :If D=J and 4≤J<7 :S=M :If D=J and J<4:Goto 2 :If D≠J and D≤3:Goto 2 :If D≠J and D>3 :S=M :If E≥7 and J≥7 :S=M :If E<7 and J<7 :S=M :If E=J and J≥7 :S=(M*2) :If E=J and 4≤J<7 :S=M :If E=J and J<4:Goto 2 :If E≠J and E≤3:Goto 2 :If E≠J and E>3 :S=M :If F≥7 and J≥7 :S=M :If F<7 and J<7 :S=M :If F=J and J≥7 :S=(M*2) :If F=J and 4≤J<7 :S=M :If F=J and J<4:Goto 2 :If F≠J and F≤3:Goto 2 :If F≠J and F>3 :S=M :If G≥7 and J≥7 :S=M :If G<7 and J<7 :S=M :If G=J and J≥7 :S=(M*2) :If G=J and 4≤J<7 :S=M :If G=J and J<4:Goto 2 :If G≠J and G≤3:Goto 2 :If G≠J and G>3 :S=M :If H≥7 and J≥7 :S=M :If H<7 and J<7 :S=M :If H=J and J≥7 :S=(M*2) :If H=J and 4≤J<7 :S=M :If H=J and J<4:Goto 2 :If H≠J and H≤3:Goto 2 :If H≠J and H>3 :S=M
toutes ces lignes peuvent facilement être optimisables |
| | | iamglamorous nouveau
Nombre de messages : 3 Age : 32 items : o Personalized field : Réputation : 0 Points : 5841 Date d'inscription : 10/05/2008
| Sujet: Re: Poker Sam 10 Mai 2008, 21:30 | |
| et surtout si quelqu'un a une idée pour l'IA des joueurs (que si leurs cartes sont interessantes ils misent beaucoup ou que si une de leur carte est égale à une sur la table mais pas la seconde et la troisieme ils misent pas beaucoup... voila le principe) je pourrais le faire mais comme je débute, je ferais entre 50 et 100 lignes par joueur et environ 20 goto! |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Sam 10 Mai 2008, 21:39 | |
| avec les listes, tout ça pourrait se simplifier... |
| | | Syfo Pokémophile
Nombre de messages : 1978 Age : 33 Localisation : IYA items :
Personalized field : 26 jetons Réputation : 8 Points : 6767 Date d'inscription : 09/08/2007
Profil TI: 80, 82, 83, 83+, 84+ TO: 2 945 [GAIN * 1.1] Spécialité: Basic z80
| Sujet: Re: Poker Dim 11 Mai 2008, 12:07 | |
| Pour L'IA des joueurs, a part une grosse serie de tests, je vois pas trop. Genre:
If paire //jouer pas mal If double paire //jouer encore plus
etc.
(c'est du hold' them?) |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Dim 11 Mai 2008, 14:42 | |
| vous saviez que pour tester plusieurs conditions d'un coup, au lieu d'utiliser If condition1 and condition2 and condition3 ...
on pouvait utiliser les listes : If prod({condition1,condition2,condition3
ou sum() si c'est des "or" |
| | | Syfo Pokémophile
Nombre de messages : 1978 Age : 33 Localisation : IYA items :
Personalized field : 26 jetons Réputation : 8 Points : 6767 Date d'inscription : 09/08/2007
Profil TI: 80, 82, 83, 83+, 84+ TO: 2 945 [GAIN * 1.1] Spécialité: Basic z80
| Sujet: Re: Poker Dim 11 Mai 2008, 15:29 | |
| Non je savais pas. Mais c'est useless, non? |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Dim 11 Mai 2008, 20:00 | |
| j'sais pas si c'est plus rapide... |
| | | ProgVal modérateur
Nombre de messages : 4107 Age : 173 Localisation : In da cloud items : o Personalized field : Réputation : -4 Points : 6726 Date d'inscription : 09/08/2007
Profil TI: V200 - NSpire TO: 120 [2352 - 2%] Spécialité: Programmation web
| Sujet: Re: Poker Dim 11 Mai 2008, 20:25 | |
| C'est déjà compliqué pour un humain de jouer bien...
En plus il faudra bluffer, et tout... |
| | | Syfo Pokémophile
Nombre de messages : 1978 Age : 33 Localisation : IYA items :
Personalized field : 26 jetons Réputation : 8 Points : 6767 Date d'inscription : 09/08/2007
Profil TI: 80, 82, 83, 83+, 84+ TO: 2 945 [GAIN * 1.1] Spécialité: Basic z80
| Sujet: Re: Poker Dim 11 Mai 2008, 20:32 | |
| Pas con l'idee de bluffer. Mais deja programmer une AI de base qui joue plus ou moins (voir meme s'arrete si son jeu est vraiment trop mauvais) serait pas mal.
Apres c'est sur que rajouter du bluff s'averera indispensable, sinon le joueur en voyant l'AI miser le paquet saura de suite qu'elle a un super jeu. |
| | | iamglamorous nouveau
Nombre de messages : 3 Age : 32 items : o Personalized field : Réputation : 0 Points : 5841 Date d'inscription : 10/05/2008
| Sujet: Re: Poker Dim 11 Mai 2008, 21:07 | |
| oui c'est du texas hold'em comme poker |
| | | tama Admin
Nombre de messages : 12376 Age : 32 Localisation : DTC ? :triso: Humeur : =) items : o Personalized field : huh ? oO Réputation : 3 Points : 9445 Date d'inscription : 08/08/2007
Profil TI: 84+, 89 tita, 89 tita TO: infini :p Spécialité: C 68k
| Sujet: Re: Poker Dim 11 Mai 2008, 21:51 | |
| c'est assez dur de faire une IA "convenable" pour poker |
| | | Contenu sponsorisé
| Sujet: Re: Poker | |
| |
| | | |
Page 1 sur 1 | |
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
|
|