タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

algorithmsとrandomに関するfcicqのブックマーク (6)

  • The Reasonable Effectiveness of the Multiplicative Weights Update Algorithm

    This article was ported from my old Wordpress blog here, If you see any issues with the rendering or layout, please send me an email. papadHard to believeSanjeev Arora and his coauthors consider it “a basic tool [that should be] taught to all algorithms students together with divide-and-conquer, dynamic programming, and random sampling.” Christos Papadimitriou calls it “so hard to believe that it

    fcicq
    fcicq 2017/02/28
    bandit like
  • せっき~のゲーム屋さん ゲーム世界を動かすサイコロの正体 ~ 往年のナムコタイトルから学ぶ乱数の進化と応用

    [PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。 2014年9月4日 にあった、CEDECの講演についての記事です。 ゲーム世界を動かすサイコロの正体 ~ 往年のナムコタイトルから学ぶ乱数の進化と応用 バンダイナムコのプログラマさんより乱数の講演です。 ・ゲームで使われている主要な乱数のしくみについて ・乱数のアルゴリズムが改良されていく歴史 ・乱数の選択の注意点 などについて、取り上げられました。 (乱数分布などは せっかくなので 初め、自分で乱数プログラム組んで 用意しようかと思ったのですが 力尽きてしまい・・・ 撮影した写真を使わせていただきました) -------------------------------------------------------------------- ●はじめに ・真の乱数 → 実際のサ

  • Fisher–Yates shuffle - Wikipedia

    Example of shuffling five letters using Durstenfeld's in-place version of the Fisher–Yates shuffle The Fisher–Yates shuffle is an algorithm for shuffling a finite sequence. The algorithm takes a list of all the elements of the sequence, and continually determines the next element in the shuffled sequence by randomly drawing an element from the list until no elements remain.[1] The algorithm produc

    Fisher–Yates shuffle - Wikipedia
  • Reservoir sampling - Wikipedia

    Reservoir sampling is a family of randomized algorithms for choosing a simple random sample, without replacement, of k items from a population of unknown size n in a single pass over the items. The size of the population n is not known to the algorithm and is typically too large for all n items to fit into main memory. The population is revealed to the algorithm over time, and the algorithm cannot

    fcicq
    fcicq 2011/10/17
    note: choose x random unique items: while: t=rand(1,k); r.append((t not in r) and t or k); k++
  • 良い乱数・悪い乱数

    C言語標準ライブラリの乱数rand( )は質に問題があり、禁止している学会もある。 他にも乱数には様々なアルゴリズムがあるが、多くのものが問題を持っている。 最も多くの人に使われている乱数であろう Visual Basic の Rnd の質は最低である。 そもそも乱数とは 乱数とは、来サイコロを振って出る目から得られるような数を意味する。 このような乱数は予測不能なものである。 しかし、計算機を使って乱数を発生させた場合、 次に出る数は完全に決まっているので、予測不能とはいえない。 そこで、計算機で作り出される乱数を疑似乱数(PRNG)と呼び区別することがある。 ここでは、特にことわらない限り乱数とは疑似乱数のことを指すとする。 計算機でソフト的に乱数を発生させることの最大のメリットは、 再現性があることである。 初期状態が同じであれば、発生する乱数も全く同じものが得られる。 このことは

    fcicq
    fcicq 2011/03/05
    random number generators.
  • Xorshift - Wikipedia

    Xorshiftは疑似乱数列生成法の1つである。George Marsaglia(w:George Marsaglia)が2003年に提案した。演算が排他的論理和とビットシフトのみであるため高速である[1] などの特徴がある。 実装例[編集] Xorshiftアルゴリズム[2]のCによる実装例[3]: #include <stdint.h> struct xorshift32_state { uint32_t a; }; /* The state word must be initialized to non-zero */ uint32_t xorshift32(struct xorshift32_state *state) { /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ uint32_t x = state

    fcicq
    fcicq 2010/12/28
    random number generator
  • 1